Hello
Pls, i need your Help:
This stuff is not work:
$value = (Get-ItemProperty -Path "HKLM:\System\CurrentControlSet\Control\RadioManagement\SystemRadioState").'(default)' # "0" ???? / or -name -value?
If ($value -eq 0){set-ItemProperty “1”}
Else {set-ItemProperty ”0”}
Get-ItemProperty -Path "HKLM:\System\CurrentControlSet\Control\RadioManagement\SystemRadioState").'(default)'
I get 0 !! desactive
How i get beak to 1 ??? Active
Many Thank
Arnold
Get-ItemProperty: toggle 0 to 1 or 1 to 0
- Simon Sheppard
- Posts: 191
- Joined: 2021-Jul-10, 7:46 pm
- Contact:
Re: Get-ItemProperty: toggle 0 to 1 or 1 to 0
In your set-ItemProperty, you need to give it the -path where you want to set the value.
Re: Get-ItemProperty: toggle 0 to 1 or 1 to 0
Sir, many thank for your reply
i have modify to:
cls
$value = (Get-ItemProperty -Path "HKLM:\System\CurrentControlSet\Control\RadioManagement\SystemRadioState") #'(default)' # "0" ???? / or -name -value?
If ($value -eq 0){(Set-ItemProperty -Path "HKLM:\System\CurrentControlSet\Control\RadioManagement\SystemRadioState"). '1'}
Else {(Set-ItemProperty -Path "HKLM:\System\CurrentControlSet\Control\RadioManagement\SystemRadioState"). ”0”}
This is also not work:
$value = (Set-ItemProperty -Path "HKLM:\System\CurrentControlSet\Control\RadioManagement\SystemRadioState"). "1"
I have to add -name?
Thanks
Arnold
i have modify to:
cls
$value = (Get-ItemProperty -Path "HKLM:\System\CurrentControlSet\Control\RadioManagement\SystemRadioState") #'(default)' # "0" ???? / or -name -value?
If ($value -eq 0){(Set-ItemProperty -Path "HKLM:\System\CurrentControlSet\Control\RadioManagement\SystemRadioState"). '1'}
Else {(Set-ItemProperty -Path "HKLM:\System\CurrentControlSet\Control\RadioManagement\SystemRadioState"). ”0”}
This is also not work:
$value = (Set-ItemProperty -Path "HKLM:\System\CurrentControlSet\Control\RadioManagement\SystemRadioState"). "1"
I have to add -name?
Thanks
Arnold
- Simon Sheppard
- Posts: 191
- Joined: 2021-Jul-10, 7:46 pm
- Contact:
Re: Get-ItemProperty: toggle 0 to 1 or 1 to 0
you dont need those brackets within the set-itemproperty parameters
See the syntax here
https://ss64.com/ps/set-itemproperty.html
See the syntax here
https://ss64.com/ps/set-itemproperty.html