fix for proper variable name
This commit is contained in:
parent
9168e6844a
commit
6ce98295c1
1 changed files with 2 additions and 2 deletions
|
@ -172,12 +172,12 @@ Function Set-ActivePowerPlan {
|
|||
|
||||
$res = 0
|
||||
if ($PSCmdlet.ShouldProcess($Plan, "Set Power Plan")) {
|
||||
$res = [Ansible.WinPowerPlan.NativeMethods]::PowerSetActiveScheme([IntPtr]::Zero, $plan_guid)
|
||||
$res = [Ansible.WinPowerPlan.NativeMethods]::PowerSetActiveScheme([IntPtr]::Zero, $Plan)
|
||||
}
|
||||
|
||||
if ($res -ne 0) {
|
||||
$err_msg = Get-LastWin32ErrorMessage -ErrorCode $res
|
||||
Fail-Json -obj $result -message "Failed to set the active power plan to $name - $err_msg"
|
||||
Fail-Json -obj $result -message "Failed to set the active power plan to $Plan - $err_msg"
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue