Certain PowerShell commands borked


shoober420

Active member
Member
Local time
3:46 AM
Posts
83
Visit site
OS
Windows 11 27729
my hairline has been receding trying to figure out why some powershell commands are borked. in particular running this string fails on my machine.

Code:
Set-CimInstance -Query 'SELECT InstanceName FROM MSPower_DeviceEnable WHERE (Enable = True)' -Namespace 'root\WMI' -Property @{Enable = $false}

Ive come across various other command string that include "Set-CimInstance" that fail the same way. Specifically from this thread.


Does anyone know any setting or option that can effect PowerShell and bork it? If i run "set-ciminstance" by itself, it says "InputObject:", so ot seems functional somewhat. I made sure my "set-executionpolicy" is on bypass and that i launch the terminal as admin, so that cant be it either.

i am in "test mode" though, it says it on the bottom right hand side of the screen. i enable it so i can install custom nvidia drivers modified by NVCleanstall. would "test mode" or another bcdedit tweak bork certain powershell commands? im using windows insider canary builds, im on 27729. could it be a windows canary bug? anyone have any clue why this is happening?
 
Windows Build/Version
Windows 11 27729

My Computer

System One

  • OS
    Windows 11 27729
    Computer type
    PC/Desktop
    CPU
    i9 13900kf @5.7ghz all P-Cores
    Motherboard
    Aorus Master Z790
    Memory
    32gb DDR5 7200
    Graphics Card(s)
    RTX 4090
    Other Info
    https://www.github.com/shoober420
heres an update, i tested powershell on another machine that uses windows canary 27729, and it works. ive used tweak scripts on the machine it doesnt work on. the thing is, ive done countless WinRE resets (keep my files). im even doing one as we speak as im running out of ideas. i thought doing a PC reset (keep my files) would revert any tweak settings. this is the case as ive used it to revert bad tweaks in the past. whats odd is even after a WinRE reset (keep my files), the computer is still in test mode. im almost for certain i used "bcdedit" to change the pc to "test mode". does doing a bcdedit tweak effect the machine even after a WinRE reset (keep my files)? ill use bcdedit to disable test mode and see if fully works.
 

My Computer

System One

  • OS
    Windows 11 27729
    Computer type
    PC/Desktop
    CPU
    i9 13900kf @5.7ghz all P-Cores
    Motherboard
    Aorus Master Z790
    Memory
    32gb DDR5 7200
    Graphics Card(s)
    RTX 4090
    Other Info
    https://www.github.com/shoober420
another update, i disabled test mode on the machine using bcdedit and powershell is still borked. what possible tweaks could remain after a WinRE reset (keep my files)? they definitely cant be registry tweaks. im going to look through my scripts and see which tweaks are not registry tweaks and see what could remain after a WinRE reset (keep my files).
 

My Computer

System One

  • OS
    Windows 11 27729
    Computer type
    PC/Desktop
    CPU
    i9 13900kf @5.7ghz all P-Cores
    Motherboard
    Aorus Master Z790
    Memory
    32gb DDR5 7200
    Graphics Card(s)
    RTX 4090
    Other Info
    https://www.github.com/shoober420
i skimmed through my scripts, and the only thing that seems that could be persistant after a WinRE reset (keep my files) are bcdedit tweaks, hence test mode remaining on afterwards. i did that a while ago. heres all the bcdedit tweaks present in my script.

Code:
bcdedit /set x2apicpolicy Enable
bcdedit /set configaccesspolicy Default
bcdedit /set MSI Default
bcdedit /set usephysicaldestination No
bcdedit /set usefirmwarepcisettings No
bcdedit /set firstmegabytepolicy UseAll
bcdedit /set avoidlowmemory 0x8000000
bcdedit /set nolowmem Yes
bcdedit /set pae ForceEnable
bcdedit /deletevalue useplatformclock
bcdedit /set useplatformtick yes
bcdedit /set disabledynamictick yes
bcdedit /set tscsyncpolicy enhanced
bcdedit /set linearaddress57 OptOut
bcdedit /set increaseuserva 268435328
bcdedit /set disableelamdrivers Yes
bcdedit /set highestmode Yes
bcdedit /set forcefipscrypto No
bcdedit /set noumex Yes
bcdedit /set uselegacyapicmode No
bcdedit /set ems No
bcdedit /set extendedinput Yes
bcdedit /set debug No

what else im going to do is run the tweak script in sections and see what particular part borks powershell and look for an obvious tweak that could effect powershell
 

My Computer

System One

  • OS
    Windows 11 27729
    Computer type
    PC/Desktop
    CPU
    i9 13900kf @5.7ghz all P-Cores
    Motherboard
    Aorus Master Z790
    Memory
    32gb DDR5 7200
    Graphics Card(s)
    RTX 4090
    Other Info
    https://www.github.com/shoober420
well i figured it out. out of desperation i did a WinRE restart (keep my files) on another computer, and now that machine is doing it too. i didnt run any tweak scripts on it. both machines are completely fresh and nothing tweaked on them. why does doing a WinRE restart (keep my files) bork powershell (specifically the set-ciminstance command)?
 

My Computer

System One

  • OS
    Windows 11 27729
    Computer type
    PC/Desktop
    CPU
    i9 13900kf @5.7ghz all P-Cores
    Motherboard
    Aorus Master Z790
    Memory
    32gb DDR5 7200
    Graphics Card(s)
    RTX 4090
    Other Info
    https://www.github.com/shoober420

Latest Support Threads

Back
Top Bottom