Reply to Message

View discussion in a popup

Replying to:
jamesreinke2
Enthusiast
Enthusiast

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

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?

Reply
0 Kudos