Pls help me in configuring the below setting inside the guest os.
$defaultwindowssettings :
these setting should be automated and applied to all the windows machines.
power options set to never
firewall allow inbound and outbound
remote connections allow
UAC disable
create new user 'testuser' and set password 'testpassword', set only- password never expires and uncheck remaining.
add administrator and testuser to administrators groups
$defaultlinuxsettings:
these setting should be automated and applied to all the linux machines. using (invoke-vmscript)
Disable selinux,
disable networkmanager, firewall, firewalld, libvirtd, iptables
add new user 'linuxuser' user
add linuxuser to sudoers
$defaultwindowssettings=@' '@ $defaultlinuxsettings=@' '@ $answerfile= 'C:\Users\vk185112\Desktop\answerfile.xlsx' foreach($vmsautodeploy in Import-Excel $answerfile ){ if($vmsautodeploy.GuestOSType -eq 'windows'){ Invoke-VMScript -VM $vmsautodeploy.VMName -GuestUser $vmsautodeploy.UserName -GuestPassword $vmsautodeploy.Password -ScriptText $defaultwindowssettings -ScriptType Powershell } else { Invoke-VMScript -VM $vmsautodeploy.VMName -GuestUser $vmsautodeploy.UserName -GuestPassword $vmsautodeploy.Password -ScriptText $defaultlinuxsettings -ScriptType Bash } }