Quantcast
Channel: Windows PowerShell Forum
Viewing all articles
Browse latest Browse all 2314

Start-Job löst Variable nicht auf?

$
0
0

Hallo Leute,

bin am Verzweifeln mit folgenden Zeilen:

"PC1", "PC2", "PC3" | foreach {
       if (Test-Connection -ComputerName $_ -count 1 -Delay 1) {
           $dest = -join ("\\", $_,  "\C$\Program Files (x86)\")
$j = Start-Job -ScriptBlock { Copy-Item "\\ml-xp\d$\ToCopy" -Destination $dest -recurse -Force }
...

Es kommt zwar keine Fehlermeldung, aber die Kopie wird nicht erstellt. Wenn ich $dest aber durch eine Konstante wie "\\ml-xp\c$\Program Files (x86)\" ersetze funktioniert die Kopiererei.

Kann mir das bitte mal jemand erklären?

MfG

Michael L.









Viewing all articles
Browse latest Browse all 2314


<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>