Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

xPowerPlan: Trying to use it on Windows 10 fails with no Activate method error #155

Closed
MarkKharitonov opened this issue Apr 20, 2018 · 3 comments · Fixed by #202 or #203
Closed

xPowerPlan: Trying to use it on Windows 10 fails with no Activate method error #155

MarkKharitonov opened this issue Apr 20, 2018 · 3 comments · Fixed by #202 or #203
Labels
bug The issue is a bug. external The issue cannot be resolved within the DSC Resource Kit.

Comments

@MarkKharitonov
Copy link

MarkKharitonov commented Apr 20, 2018

Please, observe the following code:

$Name = "High Performance"
$getCimInstanceArguments = @{
    Name   = 'root\cimv2\power'
    Class  = 'Win32_PowerPlan'
    Filter = "ElementName = '$Name'"
}
$plan = Get-CimInstance @getCimInstanceArguments
$plan | Invoke-CimMethod -MethodName Activate

It works on Windows Server 2012, but fails with no Activate method when ran on Windows 10. Amazingly it works on Windows 8.

Hence the xPowerPlan resource cannot be used on Windows 10.

@mrkrch
Copy link

mrkrch commented May 3, 2018

I can confirm.

However, the problem is not with PowerShell. Somewhere between 1703 to 1709, the Win32_PowerPlan class's "Activate" method was broken. It seemed to coincide with the new "Windows performance power slider" feature.

@johlju
Copy link
Member

johlju commented May 3, 2018

As per previous comment I will label this as 'bug' and 'external'.

@johlju johlju added bug The issue is a bug. help wanted The issue is up for grabs for anyone in the community. external The issue cannot be resolved within the DSC Resource Kit. labels May 3, 2018
@chrdionne
Copy link

I have same issue in Windows Server 1803.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug The issue is a bug. external The issue cannot be resolved within the DSC Resource Kit.
Projects
None yet
5 participants