Chapter 3 Quick Reference
To | Do This |
|---|---|
Produce a listing of all variables defined in a Windows PowerShell session | Use the Set-Location cmdlet to change location to the variable PSDrive, then use the Get-ChildItem cmdlet |
Obtain a listing of all the aliases | Use the Set-Location cmdlet to change location to the alias PSDrive, then use the Get-ChildItem cmdlet to produce a listing of aliases. Pipeline the resulting object into the Where-Object cmdlet and filter on the name property for the appropriate value |
Delete a directory that is empty | Use the Remove-Item cmdlet and supply the name of the directory |
Delete a directory that contains other items | Use the Remove-Item cmdlet and supply the name of the directory and specify the recurse argument |
Create a new text ... |
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Read now
Unlock full access