Absent Member.. george_cassar Absent Member..
Absent Member..
579 views

Powershell scripts for VMWare Vsphere Issues

Hi,

 

Two parts i am querying here.

 

1. Does anyone have any timeout issues when running powershell scripts via HP-OO?

 

I have a script which tries to add a new role to a virtual machine which timesout with java issues

 

$vm = "${serverName}"
Get-VM $vm | New-VIPermission -Role "Virtual Machine Administrator" -Principal "${domain}\${userId}" -Propagate:$true

 

2. Is anyone aware of any out of the box operations which will allow me to set the new role on a vm as per the script above?

 

Thanks,

Labels (2)
0 Likes
3 Replies
jadda Absent Member.
Absent Member.

Re: Powershell scripts for VMWare Vsphere Issues

Hi George,

 

 We do use powershell script for VM deployment process (setting IP to VM,fetching device names). I suggest you to include statement    "sleep 10"  in the script  , which sleeps the script for 10 seconds. This really works for us . At presenrt we do not have any out of box operations to run  the script mentioned by you.

 

Thanks 

Jadda Pavan Kumar

0 Likes
jadda Absent Member.
Absent Member.

Re: Powershell scripts for VMWare Vsphere Issues

the new script will be

$vm = "${serverName}"
Get-VM $vm | New-VIPermission -Role "Virtual Machine Administrator" -Principal "${domain}\${userId}" -Propagate:$true

sleep 10
0 Likes
Absent Member.. george_cassar Absent Member..
Absent Member..

Re: Powershell scripts for VMWare Vsphere Issues

I'll add it and see how it goes. Thanks

0 Likes
The opinions expressed above are the personal opinions of the authors, not of Micro Focus. By using this site, you accept the Terms of Use and Rules of Participation. Certain versions of content ("Material") accessible here may contain branding from Hewlett-Packard Company (now HP Inc.) and Hewlett Packard Enterprise Company. As of September 1, 2017, the Material is now offered by Micro Focus, a separately owned and operated company. Any reference to the HP and Hewlett Packard Enterprise/HPE marks is historical in nature, and the HP and Hewlett Packard Enterprise/HPE marks are the property of their respective owners.