我有某种PowerShell脚本。如果我想清理这段代码,它将是什么样?
$Source = "\\share1\"
$Dest = "\\share2\folder1\"
$Dest2 = "\\share2\folder2\"
Remove-Item $Source\*.asc -Force
Get-Childitem $Sourc -Recurse |
Rename-Item -NewName {$_.Name -replace ".net", ".csv"}
Move-Item -Path $Source\*.csv -destination $Dest2 -Force -ErrorAction SilentlyContinue
Move-Item -Path $Source\*.* -destination $Dest -Force -ErrorAction SilentlyContinue