Server Management - Remote Server Management
cancel
Showing results for 
Search instead for 
Did you mean: 

Scripting Tools for Windows PowerShell

AndyMcM
Visitor

Scripting Tools for Windows PowerShell

Is anyone else out there using Scripting Tools for Windows PowerShell?

Trying to use the Mount-HPiLOVirtualMedia cmdlet and it works ish. Can connect an ISO image over an HTTP connection but I can't get it to boot. I use the command:

Mount-HPiLOVirtualMedia -server <IP> -Device CDROM -DisableCertificateAuthentication -ImageURL <URL>

On the Virtual Media screen in the iLO managment, the Connected box is greyed out so looks like its mounted but not connected, anyone know how to Connect?

Cheers

Andy.

6 REPLIES

Re: Scripting Tools for Windows PowerShell

Andy,

I can see that you are using HPiLOCmdlets 1.3.  Could you tell me what version of iLO firmware you are using, what OS and PS versions?  I think from your email that you are getting no errors when executing the script to test this.  Are you also setting the boot order to boot the CDROM using either Set-HPiLOOneTimeBootOrder or Set-HPiLOPersistentBootOrder?

HPE PowerShell Team

jlg

 

AndyMcM
Visitor

Re: Scripting Tools for Windows PowerShell

Hi jlg,

Thanks for getting back to me. Here is the info below:

HPiLOCmdlets: 1.3

iLO Firmware Version: iLO3 on 1.85 (May 13 2015, latest with SPP)

OS Version: Windows 7 64bit

PowerShell Version: 

Major Minor Build Revision
----- ----- ----- --------
5 0 10586 117

 

 

I have tried using Set-HPiLOOneTimeBootOrder and Set-HPiLOPersistentBootOrder but neither worked. Attached a screenshot of the interface, as well as changing the order in the web interface, but it just does not want to boot from ISO.

Exact command being used:

Mount-HPiLOVirtualMedia -server XXX.XXX.XXX.XXX -Credential $crObj -Device CDROM -DisableCertificateAuthentication -ImageURL http://XXX.XXX.XXX.XXX:8080/843216_001_spp_2015.10.0-SPP2015100.2015_0921.6.iso

Have attached a screenshot of what iLO web interface looks like after running the above command.

Thanks for any help!!

GokulKS
Valued Contributor

Re: Scripting Tools for Windows PowerShell

Hi,

I think the problem here is Mount-HPiLOVirtualMedia cmdlet just mounts the virtual media to target server but does not connect the same. To connect the virtual media user need to invoke Set-HPiLOVMStatus cmdlet to make it connected to the remote server.

Set-HPiLOVMStatus -Server $Server -Credential $cred -VMBootOption CONNECT -Device CDROM   #connect CDROM

So the flow of cmdlets to attach a media to the remote server are,

Mount-HPiLOVirtualMedia -Server $server -Credential $cred -Device CDROM -ImageURL $URLImage #mount

Set-HPiLOVMStatus -Server $server -Credential $cred -VMBootOption CONNECT -Device CDROM   #connect CDROM

Set-HPiLOOneTimeBootOrder -Server $server  -Credential $cred -Device CDROM  #Set Boot order

Set-HPiLOVirtualPowerButton -Server $server -Credential $cred -PressType Press #restart server

Thanks,

HPE PowerShell Team

Gokul

Don't forget to give Kudos if the problem got resolved or like suggestion.
virgored
Occasional Visitor

Re: Scripting Tools for Windows PowerShell

Gokul
This does not work I have found
Mount-HPiLOVirtualMedia -Server $Server -Username $UserName -Password $Password -Device CDROM   -ImageURL $ImageURL

Set-HPiLOVMStatus -Server $server -Username $UserName -Password $Password  -VMBootOption CONNECT -Device CDROM   #connect CDROM

Set-HPiLOOneTimeBootOrder -Server $server  -Username $UserName -Password $Password -Device CDROM  #Set Boot order
All run fine
when I run :

Get-HPiLOVMStatus -Server $server -Username $UserName -Password $Password


IP : 10.xxx.xxx.xxx
HOSTNAME :
STATUS_TYPE : OK
STATUS_MESSAGE : OK
VM_APPLET : DISCONNECTED - Should be Connected
DEVICE : FLOPPY - Should be CD-ROM
BOOT_OPTION : NO_BOOT - should be Boot Once
WRITE_PROTECT : YES
IMAGE_INSERTED : NO
IMAGE_URL :Http//Server-Name/folder1/864794_001_spp-2016.04.0-SPP2016040.2016_0317.20.iso

vdepagter
Occasional Visitor

Re: Scripting Tools for Windows PowerShell

I'm experiencing the same issue,

Mount-HPiLOVirtualMedia -Server $iLOIP -User $iLOUser -Pass $iLOPass -DisableCertificateAuthentication -Device CDROM -ImageURL $ImageURL | fl
Set-HPiLOVMStatus -Server $iLOIP -User $iLOUser -Pass $iLOPass -DisableCertificateAuthentication -Device CDROM -VMBootOption CONNECT | fl
Set-HPiLOOneTimeBootOrder -Server $iLOIP -User $iLOUser -Pass $iLOPass -DisableCertificateAuthentication -Device CDROM | fl

All return no output but are run succesfully (confirmed through iLO web interface).

Running the following command afterwards to confirm the settings:

Get-HPiLOVMStatus -Server $iLOIP -User $iLOUser -Pass $iLOPass -DisableCertificateAuthentication | fl

Returns incorrect information:

IP : 1.2.3.4
HOSTNAME : ilo-host
STATUS_TYPE : OK
STATUS_MESSAGE : OK
VM_APPLET : DISCONNECTED
DEVICE : FLOPPY
BOOT_OPTION : NO_BOOT
WRITE_PROTECT : NO
IMAGE_INSERTED : NO
IMAGE_URL :

Also, I am unable to use -Credential successfully for most cmdlets, it seems to ignore it and prompts for username and password. For some cmdlets (Get-HPiLOHostPower) it works fine. Using -User and -Password does work however.

GokulKS
Valued Contributor

Re: Scripting Tools for Windows PowerShell

Hi,

No you missed using -Device for get operation of VM status as by default it will fetch you the floppy information which is not connected.

As mentioned below use the proper parameter name to fetch the required details.

PS C:\Windows\system32> Get-HPiLOVMStatus -Server $iLOIP -User $iLOUser -Pass $iLOPass -DisableCertificateAuthentication -Device CDROM | fl

IP : 192.168.x.x
HOSTNAME : xyx-01.powershvpn.com
STATUS_TYPE : OK
STATUS_MESSAGE : OK
VM_APPLET : DISCONNECTED
DEVICE : CDROM
BOOT_OPTION : BOOT_ALWAYS
WRITE_PROTECT : YES
IMAGE_INSERTED : YES
IMAGE_URL : http://192.168.x.y/webfiles/win2016_server_iso/en_windows_server_2016_x64_dvd_9718492.iso

Then regarding credentail not able to use i don't think so as i am able to run the cmdlet with credential object itself for HostPower. Let me know what are all cmdlets you can't run with credentails alone.

PS C:\Windows\system32> Get-HPiLOHostPower -Credential $cred -Server $iLOIP -DisableCertificateAuthentication -

IP : 192.168.10.8
HOSTNAME : xyz-01.powershvpn.com
STATUS_TYPE : OK
STATUS_MESSAGE : OK
HOST_POWER : ON

Thanks,

Gokul

HPE PowerShell Team

Don't forget to give Kudos if the problem got resolved or like suggestion.