powershell, pwsh, windows/*: fix PowerShell conventions (#11465)

This commit is contained in:
Reinhart Previano Koentjoro
2023-11-12 16:46:05 +07:00
committed by GitHub
parent 1027451fe5
commit 159626c127
37 changed files with 166 additions and 119 deletions

View File

@@ -6,24 +6,24 @@
- Remove specific files or registry keys (without subkeys):
`Remove-Item {{path\to\file_or_key1 path\to\file_or_key2 ...}}`
`Remove-Item {{path\to\file_or_key1 , path\to\file_or_key2 ...}}`
- Remove hidden or read-only files:
`Remove-Item -Force {{path\to\file1 path\to\file2 ...}}`
`Remove-Item -Force {{path\to\file1 , path\to\file2 ...}}`
- Remove specific files or registry keys interactively prompting before each removal:
`Remove-Item -Confirm {{path\to\file_or_key1 path\to\file_or_key2 ...}}`
`Remove-Item -Confirm {{path\to\file_or_key1 , path\to\file_or_key2 ...}}`
- Remove specific files and directories recursively (Windows 10 version 1909 or later):
`Remove-Item -Recurse {{path\to\file_or_directory1 path\to\file_or_directory2 ...}}`
`Remove-Item -Recurse {{path\to\file_or_directory1 , path\to\file_or_directory2 ...}}`
- Remove specific Windows registry keys and all its subkeys:
`Remove-Item -Recurse {{path\to\key1 path\to\key2 ...}}`
`Remove-Item -Recurse {{path\to\key1 , path\to\key2 ...}}`
- Perform a dry run of the deletion process:
`Remove-Item -WhatIf {{path\to\file1 path\to\file2 ...}}`
`Remove-Item -WhatIf {{path\to\file1 , path\to\file2 ...}}`