Quantcast
Channel: VMware Communities: Message List
Viewing all articles
Browse latest Browse all 258290

invoke-vmscript to configure Guest setting

$
0
0

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
}
}

Viewing all articles
Browse latest Browse all 258290

Latest Images

Trending Articles



Latest Images

<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>