Quantcast
Viewing all articles
Browse latest Browse all 230663

Re: New line `n is not working

Shouldn't that line be

$_.Name | Out-File C:\Scripts\deleted.txt -Append #this is new, and it does not work

Otherwise you will append the complete array $Removed each time.

An alternative is to move that line outside the Get-VM loop, and then remove the Append switch


Viewing all articles
Browse latest Browse all 230663

Trending Articles