I have this power-shell script to disable the bluetooth, but I got an error:<\/p>\n
# Must be run under System\n$namespaceName = \"root\\cimv2\\mdm\\dmmap\"\n$className = \"MDM_Policy_Config01_Connectivity02\"\n\n# Add the setting to turn off the Bluetooth toggle in the settings menu\nNew-CimInstance -Namespace $namespaceName -ClassName $className -Property @{ParentID=\"./Vendor/MSFT/Policy/Config\";InstanceID=\"Connectivity\";AllowBluetooth=0}\n\n# Remove the setting to allow the User to control when the radio is turned on\n$blueTooth = Get-CimInstance -Namespace $namespaceName -ClassName $className -Filter 'ParentID=\"./Vendor/MSFT/Policy/Config\" and InstanceID=\"Connectivity\"'\nRemove-CimInstance $blueTooth\n<\/code><\/pre>\n
Advertisement
//ERROR<\/p>\n
Advertisement
New-CimInstance : The requested operation is not supported.
\nAt line:6 char:1<\/p>\n
\n- New-CimInstance -Namespace $namespaceName -ClassName $className -Prop …<\/li>\n
- \n
<\/code><\/pre>\n<\/li>\n- CategoryInfo : NotImplemented: (MDM_Policy_Config01_Connectivity02:CimInstance) [New-CimInstance], CimException<\/li>\n
- FullyQualifiedErrorId : MI RESULT 7,Microsoft.Management.Infrastructure.CimCmdlets.NewCimInstanceCommand<\/li>\n<\/ul>\n
Get-CimInstance : Invalid query
\nAt line:9 char:14<\/p>\n
\n- … blueTooth = Get-CimInstance -Namespace $namespaceName -ClassName $cla …<\/li>\n
- \n
<\/code><\/pre>\n<\/li>\n- CategoryInfo : InvalidArgument: (
[Get-CimInstance], CimException<\/li>\n - FullyQualifiedErrorId : HRESULT 0x80041017,Microsoft.Management.Infrastructure.CimCmdlets.GetCimInstanceCommand<\/li>\n<\/ul>\n
Remove-CimInstance : Cannot bind argument to parameter ‘InputObject’ because it is null.
\nAt line:10 char:20<\/p>\n
\n- Remove-CimInstance $blueTooth<\/li>\n
- \n
<\/code><\/pre>\n<\/li>\n- CategoryInfo : InvalidData: (
[Remove-CimInstance], ParameterBindingValidationException<\/li>\n - FullyQualifiedErrorId : ParameterArgumentValidationErrorNullNotAllowed,Microsoft.Management.Infrastructure.CimCmdlets.RemoveCimInstanceCommand<\/li>\n<\/ul>","upvoteCount":9,"answerCount":10,"datePublished":"2019-08-08T18:24:59.000Z","author":{"@type":"Person","name":"carloslv8","url":"https://community.spiceworks.com/u/carloslv8"},"suggestedAnswer":[{"@type":"Answer","text":"
I have this power-shell script to disable the bluetooth, but I got an error:<\/p>\n
# Must be run under System\n$namespaceName = \"root\\cimv2\\mdm\\dmmap\"\n$className = \"MDM_Policy_Config01_Connectivity02\"\n\n# Add the setting to turn off the Bluetooth toggle in the settings menu\nNew-CimInstance -Namespace $namespaceName -ClassName $className -Property @{ParentID=\"./Vendor/MSFT/Policy/Config\";InstanceID=\"Connectivity\";AllowBluetooth=0}\n\n# Remove the setting to allow the User to control when the radio is turned on\n$blueTooth = Get-CimInstance -Namespace $namespaceName -ClassName $className -Filter 'ParentID=\"./Vendor/MSFT/Policy/Config\" and InstanceID=\"Connectivity\"'\nRemove-CimInstance $blueTooth\n<\/code><\/pre>\n//ERROR<\/p>\n
New-CimInstance : The requested operation is not supported.
\nAt line:6 char:1<\/p>\n
\n- New-CimInstance -Namespace $namespaceName -ClassName $className -Prop …<\/li>\n
- \n
<\/code><\/pre>\n<\/li>\n- CategoryInfo : NotImplemented: (MDM_Policy_Config01_Connectivity02:CimInstance) [New-CimInstance], CimException<\/li>\n
- FullyQualifiedErrorId : MI RESULT 7,Microsoft.Management.Infrastructure.CimCmdlets.NewCimInstanceCommand<\/li>\n<\/ul>\n
Get-CimInstance : Invalid query
\nAt line:9 char:14<\/p>\n
\n- … blueTooth = Get-CimInstance -Namespace $namespaceName -ClassName $cla …<\/li>\n
- \n
<\/code><\/pre>\n<\/li>\n- CategoryInfo : InvalidArgument: (
[Get-CimInstance], CimException<\/li>\n - FullyQualifiedErrorId : HRESULT 0x80041017,Microsoft.Management.Infrastructure.CimCmdlets.GetCimInstanceCommand<\/li>\n<\/ul>\n
Remove-CimInstance : Cannot bind argument to parameter ‘InputObject’ because it is null.
\nAt line:10 char:20<\/p>\n
\n- Remove-CimInstance $blueTooth<\/li>\n
- \n
<\/code><\/pre>\n<\/li>\n- CategoryInfo : InvalidData: (
[Remove-CimInstance], ParameterBindingValidationException<\/li>\n - FullyQualifiedErrorId : ParameterArgumentValidationErrorNullNotAllowed,Microsoft.Management.Infrastructure.CimCmdlets.RemoveCimInstanceCommand<\/li>\n<\/ul>","upvoteCount":9,"datePublished":"2019-08-08T18:24:59.000Z","url":"https://community.spiceworks.com/t/powershell-script/724754/1","author":{"@type":"Person","name":"carloslv8","url":"https://community.spiceworks.com/u/carloslv8"}},{"@type":"Answer","text":"
yall got sum a dem scrips boi???<\/p>","upvoteCount":1,"datePublished":"2019-08-08T19:04:35.000Z","url":"https://community.spiceworks.com/t/powershell-script/724754/2","author":{"@type":"Person","name":"dimforest","url":"https://community.spiceworks.com/u/dimforest"}},{"@type":"Answer","text":"
I didn’t understand you anything<\/p>","upvoteCount":2,"datePublished":"2019-08-08T19:06:17.000Z","url":"https://community.spiceworks.com/t/powershell-script/724754/3","author":{"@type":"Person","name":"carloslv8","url":"https://community.spiceworks.com/u/carloslv8"}},{"@type":"Answer","text":"