User Tools

Site Tools



ls                                               # show the list of files and folders in the current directory
ls env:\                                         # show environment variables
cd ~/                                            # go to the current user's folder
cat ./file.txt                                   # show the content of a file
Get-Process                                      # show processes
Get-PSDrive                                      # show drives
Get-LocalUser                                    # show users
Get-LocalUser | select name, sid                 # show user names and SIDs

Rename files:

get-childitem *.txt | foreach { rename-item $_ $_.Name.Replace("old", "new") }
notes/tools/powershell.txt · Last modified: 2020/08/26 (external edit)