Idera nSoftware Compellent

Power Tips

Welcome to the archive of tips delivered through Tobias' Tip of the Day RSS Feed and Your Power Tip of the Day email. Subscribe in the sidebar to get the latest tips!

Sort by: Most Recent | Most Viewed | Most Commented
  • Discovering PowerShell Background Information

    PowerShell comes with lots of white papers. However, you do not need to know the exact title of the white paper to find information about a specific topic. Simply use Get-Help and enter a keyword that is contained in the white paper title. You should...
  • Retrieving Event Logs Remotely

    PowerShell v.2 has added remote capabilities to a number of cmdlets, including Get-EventLog. So now you are able to collect important events remotely with just one line: Get-EventLog System -EntryType Warning -ComputerName PC01234 You will need to have...
  • Changing Execution Policy without Admin Rights

    In PowerShell v.2, a number of parameters have been added to Set-ExecutionPolicy, which allows you to change this setting without Admin privileges, unless an administrator has restricted this: This line will change the execution policy only for the current...
  • Smart Auto-Completion

    When you press Tab to auto-complete, PowerShell will look at what you have entered so far to find the most appropriate suggestion. One little known fact is that you can use wildcards. Have a look: C:\p*f [ TAB ] When you press Tab, PowerShell will only...
  • Auto-Completion Reverse

    You probably already know how to invoke code completion: simply press Tab. You will then see that a new suggestion is displayed each time you do this. Instead of starting over again, you can then press SHIFT+TAB if you entered Tab too quickly and have...
  • Listing Installed Software

    You will find that listing installed software can be somewhat difficult as WMI provides the Win32_Product class, which only covers managed installs (installed by MSI). You should consider reading the registry, which is a better approach.. One little known...
  • Out-GridView Dirty Tricks

    Out-Gridview is a new cmdlet in PowerShell v.2 which allows you to output objects to a "mini" excel sheet like this: Get-Process | Out-GridView However, this only works if .NET Framework 3.51 is installed. While PowerShell requires just .NET...
  • Remote Access Without Admin Privileges

    In PowerShell v.2, remote access is available only to users who hold local administrator privileges. So, even if you do have appropriate remote access to a machine, you cannot remotely access the system if you are not an Admin. This is not a technical...
  • Using MS Access Drivers on 64Bit

    Although 64bit machines have become common place, some techniques are still only 32bit. For example, whenever a PowerShell script tries to access a Microsoft Access database, this only works on 32bit machines because the MDAC drivers used for this are...
  • Running PowerShell Scripts as a Service

    You should call powershell.exe with the options -noprofile -command like this to run a PowerShell script externally: Powershell.exe -noprofile -command c:\...\script.ps1 Schedule it as a task if you want to run a script as a service. You can simply add...
  • Finding Cmdlets by Keyword

    You can easily discover the cmdlets suitable for a specific job with the help of a little function: function ??( $keywords ) { Get-Help * | ? { $_ . description -like "*$keywords*" } | Select-Object Name, Synopsis } This "??" function...
  • Uncovering Parameter Binding

    You should use Trace-Command: if you are ever in doubt about just how PowerShell binds cmdlet parameters to a cmdlet Trace-Command -psHost -Name ParameterBinding { Get-Childitem c:\windows * . log } Simply place the call in question into the brackets...
  • Mixing Parameter Sets

    You will find that some cmdlet parameters belong to different parameter sets. Any cmdlet can use only parameters from one parameter set. You will get an error when you try and mix parameters belonging to different parameter sets.. This is why this command...
  • Secret Parameter Alias Names

    It is important to note that cmdlet parameters can have assigned alias names. They are not always easy to find but they are there. This is why you can say -ea instead of -errorAction. Use this code to locate the alias parameter names of any cmdlet: 'Get...
  • Cmdlet Alias

    For most cmdlets, there are convenient shortcut names that are the alias names. So whenever you find yourself using a new cmdlet, you should take a second to determine its aliases. This may save you a lot of typing in the future. For example, the next...
1 2 3 4 5 Next > ... Last »
Copyright 2010 PowerShell.com. All rights reserved.