回复 5# uranus12 | | | $usedate = Get-Date -Format "yyyyMMddHHmmss" | | $filepath = "C:\rep\show_$usedate.csv" | | Invoke-Command -ComputerName DC07 -ScriptBlock { Repadmin /showrepl * "DC=hll,DC=net" /csv >$args[0] } -ArgumentList @($filepath) COPY |
保存到DC07 | | | $usedate = Get-Date -Format "yyyyMMddHHmmss" | | $filepath = "C:\rep\show_$usedate.csv" | | Invoke-Command -ComputerName DC07 -ScriptBlock { Repadmin /showrepl * "DC=hll,DC=net" /csv } | Set-Content -Path $filepathCOPY |
保存到本地 |