Reply to Message

View discussion in a popup

Replying to:
Chris_95
Contributor
Contributor

Hello again LuD !

Thanks for your reply.

In fact : many days to try to understand why my very simple script didn't work :

$vmlist = Get-Content -Path "C:\Powercli\Powercli_VMWARE\Scripts\Checked\vmnames.txt"
foreach($vmname in $vmlist){
Get-VM -Name $vmname }

The error message : (see many many times in forum...)

Chris_95_0-1658752631376.png

The real reason of this trouble IS NOT THE SCRIPT but the file format about... TXT FILE !

YES be careful that the response file is well written in UTF-8 FORMAT !

 

 

 

Reply
0 Kudos