Daily Office PowerShell
Get-History
history | group { $_.CommandLine }
history | where { $_.CommandLine - like "*foobar*" }
history | group { $_.CommandLine } | select count, name
history | group { $_.CommandLine } | sort count -desc | % { write-host "$($_.Count):$($_.Name)" }
Get-ChildItem
gci -Include "*.ext" -Recurse | % { $_.FullName }
gci -recurse -include "Temporary ASP.NET Files" | select FullName
dir | sort CreationTime | select -first 10
Copy-Item
copy-item .\foo\bar\foobar.zip C:\users\my.user\documents
Misc
& 7z e Foobar.zip -oFoobar
The ampersand allows the command to start with a number. The
-o
switch
touches
the destination directory.