Having this code in powershell:
$Servers = "computer.domain.com"
# Open Session
$Session = New-PSSession -ComputerName $Servers
# Create Daily Checkpoints.
Invoke-Command -Session $Session -ScriptBlock {Get-Vm * | Checkpoint-Vm -SnapshotName "Daily Snapshot" –AsJob}
My snapshot is created but with default name, why is -SnapshotName
parameter ignored?
Doing this from PS ISE works as expected...
0 Answers