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

pipe object, Verständnisfrage

$
0
0

als PowerShell newbee hätte ich eine Verständnisfrage

get-childitem -path c:\users | foreach { copy-item c:\temp\test.txt $($_.fullname)\appdata\local\temp\test.txt}

warum muss man das Object nochmals in Klammern und mit $ angeben

so geht es zb. nicht

get-childitem -path c:\users | foreach { copy-item c:\temp\test.txt $_.fullname\appdata\local\temp\test.txt}

wenn man die Variable innerhalb der Schleife nur am Bildschirm ausgibt liefert sie korrekt den Fullname




Viewing all articles
Browse latest Browse all 2314

Trending Articles



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