top of page

PowerShell Cool Tools

CTRL+J

Dropdown Helper in ISE

CTRL.png

Measure - Quick count of items collected
 

  

        Get-Service | Measure | Select Count | Format-list      
        



Tee-Object - View output and export to text
 

        Get-Service | Select Name, Status | Tee-Object C:\temp\Service.txt -Append

 

 


Startswith - Quick check of string and newline `n

   $Myteststring="MeasureMe"
        
        If ($Myteststring.StartsWith("M")){write-host "Starts with an M"}
        
        write-host `n        
        


        $Myteststring="MeasureMe"
        
        If ($Myteststring.Endswith("e")){write-host "String ends with an e"}
        
        write-host `n

 

 


Start-Sleep - Short sleep in the script
 

   Start-Sleep -Seconds 10
        
        Write-host "You just wasted 10 second of your life :P"

 

 


Pause the script to require a user to press enter.

 

 

Pause 

​

Helpful Links

bottom of page