# -*- coding: utf-8 -*-

name = 'hideprograms-startmenu-GPO'
description = 'hides start menu on Windows clientt for given GPOs'
args = {
	'name': dict(help='Name of the GPO'),
	'guid': dict(help='guid of gpo'),
}

ps = '''
$ErrorActionPreference = "Stop"
$guid="%(guid)s"
if($guid -ne "None" ){
set-GPPrefRegistryValue -Guid %(guid)s -Context User -key "HKCU\Software\Microsoft\Windows\CurrentVersion\Policies\Explorer" -ValueName NoStartMenuMorePrograms -Type DWORD -value 1 -Action Update
}else{
set-GPPrefRegistryValue -Name "%(name)s" -Context User -key "HKCU\Software\Microsoft\Windows\CurrentVersion\Policies\Explorer" -ValueName NoStartMenuMorePrograms -Type DWORD -value 1 -Action Update
}
'''
