我想存档服务器中的旧文件(大于90天),它应该是每个月单独的ZIP文件。我有powershell-v1.0所以我不能使用System.Management.Automation.PSObject 我已经创建了一个脚本,但我有一个zip文件名的问题。当我运行脚本时,所有文件都将移至名为+++的一个存档。 $folders ="C:\New folder\test\"
Function Zip
我通过ssh运行powershell脚本为ssh [email protected] "powershell -Comand - < script.ps1。只要我开始传递参数,它就会按预期工作。 当我把它作为powershell -Command - my args失败(如记录) '-' was specified with the -Command parameter; no other arg