2
我試圖運行以下腳本,我認爲很簡單。我在做什麼這裏擰......Powershell複製文件與變量
[Environment]::UserName = $username
Write-Host "The user is $username"
$from = "c:\Users\" + $username + "\favourites\*.*"
$to = "c:\test"
Write-Host "This is from dir: $from"
Write-Host "This is to dir: $to"
Copy-Item $from $to
腳本似乎並不喜歡+ $username +
...