Browse by Tags

Tagged Content List
  • Blog Post: PowerTip: Float PowerShell Help

    Summary : Learn how to display your Windows PowerShell Help in a new window. How can I keep my Windows PowerShell Help open so I can look at it while I am trying my new code? Use the ShowWindow parameter. It will open a new window that contains your Help and allow you to move it around on your...
  • Blog Post: PowerTip: Retrieve Last Token with PowerShell

    Summary : Learn how to use Windows PowerShell to retrieve the last token and avoid retyping. I used Get-Process to view a process I launched, and later I wanted to stop the process. How can I do this without doing a lot of typing or creating new variables? The $$ automatic variable contains the...
  • Blog Post: PowerTip: Find Specific Help Articles with PowerShell

    Summary : Learn how to easily find specific Help articles with Windows PowerShell. How can I use Windows PowerShell to find a Help article about automatic variables, if I am not sure of the title? Use the Get-Help cmdlet and begin with about_ , then press Tab expansion. It will cycle through matches...
  • Blog Post: PowerTip: See Number of Errors in PowerShell Session

    Summary : Learn how to determine how many errors there are in the Windows PowerShell session. How can I determine how many current errors there are in my Windows PowerShell session? Use the Count property from the Error object array: $error.count
  • Blog Post: PowerTip: Find Numeric Value of Enum in PowerShell

    Summary : Learn how to easily find the numeric value of an enum in Windows PowerShell. How can I use Windows PowerShell to easily find the numeric value of an enumeration? Use square brackets to call the enum, call the enumeration property as a static property, and reference3 the value__ property...
  • Blog Post: PowerTip: See Enumeration Value in PowerShell

    Summary : Learn how to retrieve an enumeration value in Windows PowerShell. How can I see enumeration allowed values in Windows PowerShell? Place the enumeration name in square brackets, and use the double colon syntax to retrieve a specific property. IntelliSense will show you permissible values...
  • Blog Post: PowerTip: Find Custom Default PowerShell Parameter Values

    Summary : Learn how to find custom default Windows PowerShell parameter values. How can I find what custom default Windows PowerShell parameter values I have set up on my Windows PowerShell console? Check the value of the $PSDefaultParameterValues variable, for example: PS C:\> $PSDefaultParameterValues
  • Blog Post: PowerTip: Find Path to PowerShell Module

    Summary : Easily find the path to a Windows PowerShell module. How can I easily find the location where a Windows PowerShell module is installed? Use the Path property from the PSModuleInfo object that returns from the Get-Module cmdlet, for example: (Get-Module Microsoft.PowerShell.Utility...
  • Blog Post: PowerTip: Find Network Adapters that Are Up

    Summary : Find your network adapters that are available. How can I use Windows PowerShell to find which network adapters on my computer are up? Use the Get-NetAdapter cmdlet and filter on the status, for example: (Get-NetAdapter).where{$_.status -eq 'up'} Note This command works on...
  • Blog Post: PowerTip: Use PowerShell to Find Current Connection Profile

    Summary : Use Windows PowerShell to find your current connection profile. How can I use Windows PowerShell to see what connection profile my computer is using? Use the Get-NetConnectionProfile cmdlet.
  • Blog Post: PowerTip: Use PowerShell Tab Expansion to Navigate Registry

    Summary : Use the Windows PowerShell tab expansion feature to quickly navigate the Windows registry. How can I use Windows PowerShell to explore settings in the Windows registry? Use a cmdlet like Get-Item , Get-ItemProperty , or Get-ItemPropertyValue , specify the drive (such as HKCU), and then...
  • Blog Post: PowerTip: See What Update-Help Does on Your System

    Summary : Learn how to see what the Update-Help cmdlet does on your system. How can I see what Update-Help does on my Windows 10 computer—if anything? Open the Windows PowerShell console with Admin rights, type Update-Help , and add the –Verbose switch. It will list everything that...
  • Blog Post: PowerTip: Looking at Logs with PowerShell

    Summary : Find logs that are not enabled with Windows PowerShell. How can I use Windows PowerShell to quickly see which logs in the event log tool are not enabled by default? Use the Get-WinEvent cmdlet to produce a list of all the logs, then pipe the results to the Where-Object cmdlet, and specify...
  • Blog Post: PowerTip: Get Latest Entry from Event Log with PowerShell

    Summary : Use Windows PowerShell to get the latest entry from an event log. How can I use Windows PowerShell to see the most recent entry from the application log? Use the Get-EventLog cmdlet, specify the log name, and use the –Newest 1 parameter, for example: Get-EventLog application...
  • Blog Post: PowerTip: Find Running Services on Your Workstation

    Summary : Use Windows PowerShell to easily find all running services on your workstation. How can I use Windows PowerShell to find what services are running on my workstation? Use the Get-Service cmdlet, filter the status on the word Running , and select the display name of the services, for example...
  • Blog Post: PowerTip: Find Processes with High Priority

    Summary : Learn how to use Windows PowerShell to find processes that have a high priority. How can I use Windows PowerShell to quickly see what processes have a high priority or an above normal priority? Open Windows PowerShell with Admin rights, use the Get-Process cmdlet to return processes,...
  • Blog Post: PowerTip: Recurse Specific Number of Levels with PowerShell 5

    Summary : Learn how to recurse a specific number of levels in a directory with Windows PowerShell 5.0. How can I recurse only three levels into a deeply nested directory structure? In Windows PowerShell 5.0, the Get-ChildItem cmdlet has a new –Depth parameter that will control how deeply...
  • Blog Post: PowerTip: Use PowerShell 5 to Compress Files

    Summary : Learn how to use the new Compress-Archive cmdlet to compress selected files in Windows PowerShell 5.0. How can I compress a bunch of files on my computer that match a pattern I supply to Get-ChildItem ? Use Get-ChildItem to find the files you want to compress, and pipe the results to...
  • Blog Post: PowerTip: Find Automatic Variables that Begin with Letter

    Summary : Find automatic variables in Windows PowerShell that begin with a specific letter. How can I find automatic variables in Windows PowerShell that begin with the letter P? Use the drive Windows PowerShell variable provider with a wildcard character after the letter P : DIR variable:P...
  • Blog Post: PowerTip: Find Commands and Descriptions from Module

    Summary : Find commands and their descriptions exported from a Windows PowerShell module. How can I see the commands with their descriptions that are available in a new Windows PowerShell module? Use the Get-Command ( gcm is an alias) cmdlet and specify the module. Then select the name and create...
  • Blog Post: PowerTip: Find Commands Exported by PowerShell Module

    Summary : Find commands that are exported by a Windows PowerShell module. How can I see what commands a Windows PowerShell module provides? There are two quick ways to find commands exported by a Windows PowerShell module. The first expands the ExportedCommands property from a module ( gmo is...
  • Blog Post: PowerTip: View All Available Modules

    Summary : Boe Prox shows how to view all available modules in Windows PowerShell. How can I view all of the available modules in my current Windows PowerShell session? Run Get-Module with the –ListAvailable parameter: Get-Module –ListAvailable
  • Blog Post: PowerTip: Determine if PowerShell is Running x86 or x64

    Summary : Boe Prox shows how to determine if Windows PowerShell is running x86 or x64. How can I use Windows PowerShell to determine if I am running x86 or x64? Use [intptr]::Size as follows: Switch ([intptr]::Size) { 4 {"x86"} 8 {"x64"} }
  • Blog Post: PowerTip: Use PowerShell to List Exported Types

    Summary : Boe Prox shows how to use Windows PowerShell to list exported types. How can I use Windows PowerShell to list all of the exported types? Use this command: [appdomain]::CurrentDomain.GetAssemblies()|ForEach { Try { $_.GetExportedTypes() } Catch {} }
  • Blog Post: PowerTip: Find Cmdlets with NoNewLine Parameter

    Summary : Easily find Windows PowerShell 5.0 cmdlets with the NoNewLine parameter. I heard that Windows PowerShell 5.0 introduces a NoNewLine parameter for some cmdlets, but how can I find the cmdlets? Use the Get-Command cmdlet ( gcm is an alias), and search for the ParameterName of NoNewLine...