Files and Folders
List items
Get-ChildItem is the main listing cmdlet.
Get-ChildItem
Get-ChildItem -Path . -Recurse -File
Create files and folders
Practice in a disposable learning folder.
New-Item -ItemType Directory -Path .\practice
Set-Content -Path .\practice\notes.txt -Value "Hello"
Copy, move, remove
Confirm paths before deleting.
Copy-Item .\practice\notes.txt .\practice\notes-copy.txt
Move-Item .\practice\notes-copy.txt .\practice\archive.txt
Remove-Item .\practice\archive.txt
Providers
PowerShell navigates more than disks—for example Env: and HKCU: on Windows—using similar item cmdlets.
Get-ChildItem Env:PATH
Comments
One comment per signed-in account. Comments are saved with this page’s URL.