I am looking for a script which will set the value to "Enable/Not Configured/Disable" of Allow Remote Shell Access in Gpedit via Powershell script.
Below value state value should get changed to Disable via PS script I know I can use get-gpo to change the status but when I run "Import-Module GroupPolicy" I got below error.
Import-Module : The specified module 'GroupPolicy' was not loaded because no valid module file was found in any module
directory.
At line:1 char:1
+ Import-Module GroupPolicy
+ ~~~~~~~~~~~~~~~~~~~~~~~~~
+ CategoryInfo : ResourceUnavailable: (GroupPolicy:String) [Import-Module], FileNotFoundException
+ FullyQualifiedErrorId : Modules_ModuleNotFound,Microsoft.PowerShell.Commands.ImportModuleCommand