I want to perform following tasks on Windows 2008 r2 machine -
1) Enable “Do Not Allow Windows Messenger to be run”. 2) Enable “Do Not Automatically Start Windows Messenger Initially”.
To do this, group policy exists on the following path "Open gpedit.msc >Expand Computer configuration > Administrative Templates > Windows components > Windows Messenger"
Need to do this using PowerShell script. How to do it?
In reality, you can easily control this via the regedit in either:
HKCU\Software\Policies\Microsoft\Windows\
or
HKLM\Software\Policies\Microsoft\Windows\
This would work, AFAIK:
Set-GPRegistryValue -Name "WindowsMessenger" -Key "PathToYourTheKeyYoudNeed" -ValueName "xxx" -Type String -Value "YourValue"
This also works with
-type DWORD
Now, I sadly can not really check, where the necessary keys are located, that you would need to control because I do not have any 2008r2 in my company environment.
Hope I could help!