Hi All,
I am looking for script which can disable the screen saver of all the Windows OS VM's, is there any Powershell script available which can do this ?
Regards
GD
Are these guests in Active Directory ?
If yes, why don't you use a GPO to do that ?
____________
Blog: LucD notes
Twitter: lucd22
Blog: lucd.info Twitter: @LucD22 Co-author PowerCLI Reference
Hi LUC,
Thanks for your reply, highly appreciable.
how can I do for the Vm's which are not in GPO ?
Regards
GD
Provided the VMware Tools are installed on your guest, you can use the Invoke-VMScript cmdlet to change the registry value to defines if the screensaver is active.
Something like this
$vmName = <vm-name> $bat = 'reg add "HKU\.Default\Control Panel\Desktop" /v "ScreenSaveActive" /t REG_SZ /d 0 /f' $vm = Get-VM -Name $vmName Invoke-VMScript -VM $vm -GuestUser <guest-user> -GuestPassword <guest-user-password> -HostUser <host-user> -HostPassword <host-user-password> -ScriptType "bat" -ScriptText $bat
____________
Blog: LucD notes
Twitter: lucd22
Blog: lucd.info Twitter: @LucD22 Co-author PowerCLI Reference
Hi,
Thanks Luc, I will try this, will let you know the status.
Regards
Gurjit Dhillon