1、recurse 类似-r递归
2、Get-ChildItem是获取子项目的意思,可以获取一个目录下的文件和子目录。
格式示例:Get-ChildItem -Path 路径 -Recurse –Include 匹配模式
Get-ChildItem "HKCU:\Software\Microsoft\Terminal Server Client" -Recurse
3、Remove-Item命令删除文件,类似linux rm命令
Remove-Item -Path 'D:\test' -Recurse 2>&1 | Out-Null
4、emove-ItemProperty 从一个项目中删除属性及其对应的值 . 你可以使用此命令删除注册表值及其存储的数据 .
Remove-ItemProperty -Path 'HKCU:\Software\Microsoft\Terminal Server Client\Default' 'MR*' 2>&1 | Out-Null
5、New-Item path 新建目录
New-Item -Path 'D:\test' -type directory 2>&1 | Out-Null