Powershell从文本文件复制项目
希望有人能帮忙 我在一个文本文件中有100行用于复制和粘贴文件Powershell从文本文件复制项目,powershell,Powershell,希望有人能帮忙 我在一个文本文件中有100行用于复制和粘贴文件 Copy-Item "Source\File123.txt" -Destination "Destination\Folder123" Copy-Item "Source\File542.txt" -Destination "Destination\Folder542" Copy-Item "Source\File567.txt" -Destination "Destination\Folder567" 如何让powershell
Copy-Item "Source\File123.txt" -Destination "Destination\Folder123"
Copy-Item "Source\File542.txt" -Destination "Destination\Folder542"
Copy-Item "Source\File567.txt" -Destination "Destination\Folder567"
如何让powershell通过加载文本文件来执行每一行
谢谢
……但这提出了一个问题。。你是如何得到一个包含命令的txt文件的。。?如果文件中只包含源和目标,则会容易得多
get-content C:\scripts\garbage.txt | % {Invoke-Command $([ScriptBlock]::Create("$_"))}