jamesreinke2
Enthusiast
Enthusiast

WARNING: Parameter 'VM' is obsolete. This parameter no longer accepts multiple values.

Jump to solution

When running the script below

#import list of servers from text file

$Servers = Get-Content -Path “c:\VMlist.txt”

# Take snapshot of each vm

foreach($Server in $Servers){

Get-VM -Name $Server | New-Snapshot -Name "Take 2" -Description "blah blah blah" # -Quiesce -Memory

}

I recieve this error "WARNING: Parameter 'VM' is obsolete. This parameter no longer accepts multiple values."

Is there anyway around this or is thee a better way?

0 Kudos
1 Solution

Accepted Solutions
LucD
Leadership
Leadership

The message might be a bit misleading.

The VM parameter is not obsolete, only the possibility to pass multiple values (an array) on the parameter.


Blog: lucd.info  Twitter: @LucD22  Co-author PowerCLI Reference

View solution in original post

0 Kudos
1 Reply
LucD
Leadership
Leadership

The message might be a bit misleading.

The VM parameter is not obsolete, only the possibility to pass multiple values (an array) on the parameter.


Blog: lucd.info  Twitter: @LucD22  Co-author PowerCLI Reference

0 Kudos