commands detail - s

script

  1. start-transcript

sleep

  1. start-sleep -seconds 5
  2. or
  3. start-sleep -milliseconds 250

or just:

  1. sleep 3

…will sleep for 3 seconds

sort

  1. get-process | sort-object VirtualMemorySize

sort -u

The closest PowerShell equivalent to the unix sort -u is get-unique

  1. gc c:\temp\2000.txt | sort | gu

Note: this only works as far I can see if you sort it first

Note 2: get-unique IS case sensitive

sql

This isn’t really a Powershell equivalent of a unix command, but in case it’s useful, to call Sqlserver’s implementation of the sql command line from Powershell you can use invoke-sqlcmd

  1. Invoke-Sqlcmd -ServerInstance -query "Select blah" -database _catalog

You need to have the sql module loaded for this to work, or be running the Powershell console from within SSMS