HPRESTExamples.ps1

<#
(c) Copyright 2015 Hewlett Packard Enterprise Development LP
 
Licensed under the Apache License, Version 2.0 (the "License");
You may not use this file except in compliance with the License.
You may obtain a copy of the License at
 
    http://www.apache.org/licenses/LICENSE-2.0
 
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
 
 
 
 
These examples use HPE REST PowerShell cmdlets available at http://www.powershellgallery.com/packages/HPRESTCmdlets/.
These scripts provide examples of using HPE RESTful API on HPE iLO for common use cases.
 
These examples use the following base set of cmdlets:
 
Connect-HPREST
Disconnect-HPREST
Edit-HPRESTData
Find-HPREST
Format-HPRESTDir
Get-HPRESTData
Get-HPRESTDataRaw
Get-HPRESTDir
Get-HPRESTError
Get-HPRESTHttpData
Get-HPRESTIndex
Get-HPRESTSchema
Get-HPRESTSchemaExtref
Get-HPRESTUriFromHref
Invoke-HPRESTAction
Remove-HPRESTData
Set-HPRESTData
 
#>



 
#iLO IP address and credentials to access the iLO
$Address = '192.184.217.212'
$cred = Get-Credential
Disable-HPRESTCertificateAuthentication

function Set-BIOSExample1
{
    param
    (
        [System.String]
        $Address,

        [PSCredential]
        $Credential,

        [System.String]
        $BIOSProperty,

        [System.String]
        $Value
    )

    Write-Host 'Example 1: Change a BIOS Setting'
    
    #create session
    $session = Connect-HPREST -Address $Address -Credential $Credential

    #Get list of systems
    $systems = Get-HPRESTDataRaw -Href 'rest/v1/systems' -Session $session
    foreach($sys in $systems.links.member.href) # rest/v1/systems/1, rest/v1/system/2
    {
        #Get BIOS URI from system data
        $data = Get-HPRESTDataRaw -Href $sys -Session $session
        $biosURI = $data.Oem.Hp.links.BIOS.href
    
        #get BIOS Data
        $biosData = Get-HPRESTDataRaw -Href $biosURI -Session $session

        #if property to be modified is not present in the bios data, then print error message and return
        if(-not(($biosData|Get-Member).Name -contains $BIOSProperty))
        {
            Write-Host "Property $BIOSProperty is not supported on this system"
        }
        else
        {
            #Get setting href to update bios property. For bios, property can be updated in the settings href only. Other data may or may not have setting href

            #creating setting object
            $biosSetting = @{}
            $biosSetting.Add($BIOSProperty,$Value)
            
            #updating setting in system bios settings
            $ret = Set-HPRESTData -Href $biosURI -Setting $biosSetting -Session $session
        
            # processing message obtained by executing Set- cmdlet
            if($ret.Messages.Count -gt 0)
            {
                foreach($msgID in $ret.Messages)
                {
                    $status = Get-HPRESTError -MessageID $msgID.MessageID -MessageArg $msgID.MessageArgs -Session $session
                    $status
                }
            }
        }
    }

    # disconnecting the session after use
    Disconnect-HPREST -Session $session
}
#Set-BIOSExample1 -Address $Address -Credential $cred -BIOSProperty 'AdminName' -Value 'test admin'

function Reset-ServerExample2
{
param
    (
        [System.String]
        $Address,

        [PSCredential]
        $Credential,

        [System.String]
        $Action,

        [System.String]
        $PropertyName,

        [System.String]
        $PropertyValue
    )

    Write-Host 'Example 2: Reset the server.'
    
    #create session
    $session = Connect-HPREST -Address $Address -Credential $Credential

    # getting system list
    $systems = Get-HPRESTDataRaw -Href 'rest/v1/systems' -Session $session
    foreach($sys in $systems.links.member.href) # rest/v1/systems/1, rest/v1/system/2
    {
        # creating setting object to invoke reset action.
        # Details of invoking reset (or other possible actions) is present in 'AvailableActions' of system data
        $dataToPost = @{}
        $dataToPost.Add('Action',$Action)
        $dataToPost.Add($PropertyName,$PropertyValue)
        
        # Sending reset request to system using 'POST' in Invoke-HPRESTAction
        $ret = Invoke-HPRESTAction -Href $sys -Data $dataToPost -Session $session

        # processing message obtained by executing Set- cmdlet
        if($ret.Messages.Count -gt 0)
        {
            foreach($msgID in $ret.Messages)
            {
                $status = Get-HPRESTError -MessageID $msgID.MessageID -MessageArg $msgID.MessageArgs -Session $session
                $status
            }
        }
    }

    # disconnect the session after use
    Disconnect-HPREST -Session $session
}
#Reset-ServerExample2 -Address $Address -Credential $cred -Action Reset -PropertyName ResetType -PropertyValue ForceRestart

function Set-SecureBootExample3
{
    param
    (
        [System.String]
        $Address,

        [PSCredential]
        $Credential,

        [System.String]
        $SecureBootProperty, # schema allows changing values for SecureBootEnable, ResetToDefaultKeys, ResetAllKeys

        [Boolean]
        $Value #value must be a boolean i.e. $true or $false
    )

    Write-Host 'Example 3: Enable/Disable UEFI secure boot'
    
    #create session
    $session = Connect-HPREST -Address $Address -Credential $Credential

    $systems = Get-HPRESTDataRaw -Href 'rest/v1/systems' -Session $session
    foreach($sys in $systems.links.member.href) # rest/v1/systems/1, rest/v1/system/2
    {
        #Get secure boot URI
        $sysData = Get-HPRESTDataRaw -Href $sys -Session $session
        $secureBootURI = $sysData.Oem.Hp.links.SecureBoot.href
    
        #get secure boot data and display original value
        $secureBootData = Get-HPRESTDataRaw -Href $secureBootURI -Session $session
        $secureBootData

        #if property to be modified is not present in the secure boot data, then print error message and return
        if(-not(($secureBootData|Get-Member).Name -Contains $SecureBootProperty))
        {
            Write-Host "Property $SecureBootProperty is not supported on this system"
        }
        else
        {
            # use Set cmdlet at Secure Boot href to update secure boot property. Here only boolean values are allowed for Value parameter
            # creating hashtable object with property and value
            $secureBootSetting = @{$SecureBootProperty=$Value}
            
            # Execute Set- cmdlet to post enable/disable setting at href for secure boot
            $ret = Set-HPRESTData -Href $secureBootURI -Setting $SecureBootSetting -Session $session
            
            # processing message obtained by executing Set- cmdlet
            if($ret.Messages.Count -gt 0)
            {
                foreach($msgID in $ret.Messages)
                {
                    $status = Get-HPRESTError -MessageID $msgID.MessageID -MessageArg $msgID.MessageArgs -Session $session
                    $status
                }
            }

            # get and display updated value of the property
            $secureBootData = Get-HPRESTDataRaw -Href $secureBootURI -Session $session
            $secureBootData        
        }
    }

    # disconnect the session after use
    Disconnect-HPREST -Session $session
}
#Set-SecureBootExample3 -Address $Address -Credential $cred -SecureBootProperty 'SecureBootEnable' -Value $true
  
function Set-BIOSDefaultExample4
{
    param
    (
        [System.String]
        $Address,

        [PSCredential]
        $Credential,

        [System.Object]
        $InitializationSetting
    )

    Write-Host 'Example 4: Set default BIOS settings'
    
    #create session
    $session = Connect-HPREST -Address $Address -Credential $Credential

    $systems = Get-HPRESTDataRaw -Href 'rest/v1/systems' -Session $session
    foreach($sys in $systems.links.member.href) # rest/v1/systems/1, rest/v1/system/2
    {
        #Get BIOS URI
        $sysData = Get-HPRESTDataRaw -Href $sys -Session $session
        $biosURI = $sysData.Oem.Hp.links.BIOS.href
    
        #get BIOS Data and obtain the setting href from it
        $biosData = Get-HPRESTDataRaw -Href $biosURI -Session $session
        $biosSettingURI = $biosData.links.settings.href
        
        # use BIOS setting URI to obtain setting data
        $biosSettingData = Get-HPRESTDataRaw -Href $biosSettingURI -Session $session

        # create bios setting object
        $newBiosSetting=@{}
        $newBiosSetting.Add('BaseConfig','Default')

        # preserve the Type property from the existing BIOS settings to avoid error
        $newBiosSetting.Add('Type',$biosSettingData.Type)
        
        # add other optional initialization settings provided by the user
        if(-not ($InitializationSetting -eq '' -or $InitializationSetting -eq $null))
        {
            if($InitializationSetting.GetType().ToString() -eq 'System.Management.Automation.PSCustomObject')
            {
                foreach($prop in $InitializationSetting.PSObject.Properties)
                {
                    $newBiosSetting.Add($prop.Name,$prop.Value)
                }
            }
            elseif($InitializationSetting.GetType().ToString() -eq 'System.Collections.Hashtable')
            {
                foreach($ky in $InitializationSetting.Keys)
                {
                    $newBiosSetting.Add($ky,$InitializationSetting[$ky])
                }
            }
            else
            {
                Write-Host 'Invalid input type for InitializationSetting parameter. Use PSObject or PowerShell Hashtable' -ForegroundColor red
            }
        }

        # execure HTTP PUT command using Edit-HPRESTData cmdlet to set BIOS default settings
        $ret = Edit-HPRESTData -Href $biosSettingURI -Setting $newBiosSetting -Session $session
        
        # process returned message from Edit-HPRESTData cmdlet
        if($ret.Messages.Count -gt 0)
        {
            foreach($msgID in $ret.Messages)
            {
                $status = Get-HPRESTError -MessageID $msgID.MessageID -MessageArg $msgID.MessageArgs -Session $session
                $status
            }
        }
    }

    # disconnect the session after use
    Disconnect-HPREST -Session $session
}
<#
Set-BIOSDefaultExample4 -Address $Address -Credential $cred
## reset makes the BIOS property change effective
Reset-ServerExample2 -Address $Address -Credential $cred -Action Reset -PropertyName ResetType -PropertyValue ForceRestart
#>


function Set-BootOrderExample5
{
# Changes the boot order by swapping the first two boot options in the persistant boot order list
    param
    (
        [System.String]
        $Address,

        [PSCredential]
        $Credential
    )

    Write-Host 'Example 5: Set boot order (UEFI)'
    
    #create session
    $session = Connect-HPREST -Address $Address -Credential $Credential

    $systems = Get-HPRESTDataRaw -Href 'rest/v1/systems' -Session $session
    foreach($sys in $systems.links.member.href) # rest/v1/systems/1, rest/v1/system/2
    {
        #Get BIOS URI
        $sysData = Get-HPRESTDataRaw -Href $sys -Session $session
        $biosURI = $sysData.Oem.Hp.links.BIOS.href
    
        #get BIOS Data
        $biosData = Get-HPRESTDataRaw -Href $biosURI -Session $session
    
        $bootURI = $biosData.links.Boot.href
        $bootData = Get-HPRESTDataRaw -Href $bootURI -Session $session
        $bootData.PersistentBootConfigOrder

        #if property to be modified is not present in the bios data, then print error message and return
        if(-not(($bootData|Get-Member).Name.Contains('PersistentBootConfigOrder')))
        {
            Write-Host 'Property PersistentBootConfigOrder is not supported on this system'
        }
        else
        {
            # changing boot order by interchanging first and second items in the list. Other orders can also be used
            $bootOrder = $bootData.PersistentBootConfigOrder # |ConvertFrom-Json
            $temp = $bootOrder[0]
            $bootorder[0] = $bootOrder[1]
            $bootOrder[1] = $temp

            # Getting the href location where the order change has to be 'PATCHed'
            $bootSettingURI = $bootData.links.settings.href
            
            # create object to PATCH
            $persistentBootConfig = @{'PersistentBootConfigOrder'=$bootOrder}

            # execute HTTP PATCH operation using Set-HPRESTData cmdlet
            $ret = Set-HPRESTData -Href $bootSettingURI -Setting $persistentBootConfig -Session $session
            
            # process returned message from Set-HPRESTData cmdlet
            if($ret.Messages.Count -gt 0)
            {
                foreach($msgID in $ret.Messages)
                {
                    $status = Get-HPRESTError -MessageID $msgID.MessageID -MessageArg $msgID.MessageArgs -Session $session
                    $status
                }
            }
        }
    }

    # disconnect the session after use
    Disconnect-HPREST -Session $session
}
<#
#---------------------------------------------------------------------------------------------#
 
## change boot order. Internally the example swaps first and second boot targets.
Set-BootOrderExample5 -Address $Address -Credential $cred
##reset maked the boot order effective
Reset-ServerExample2 -Address $Address -Credential $cred -Action Reset -PropertyName ResetType -PropertyValue ForceRestart
 
#### wait for server to reboot and POST. (Change sleep time as required)
Start-Sleep -Seconds 300
 
## change boot order to original by swapping back the first two boot targets
Set-BootOrderExample5 -Address $Address -Credential $cred
##reset makes the boot order effective
Reset-ServerExample2 -Address $Address -Credential $cred -Action Reset -PropertyName ResetType -PropertyValue ForceRestart
#---------------------------------------------------------------------------------------------#
#>


function Set-TempBootOrderExample6
{
    param
    (
        [System.String]
        $Address,

        [PSCredential]
        $Credential,

        [System.String]
        $BootTarget
    )

    Write-Host 'Example 6: Set one-time(temporary)boot order'
    
    #create session
    $session = Connect-HPREST -Address $Address -Credential $Credential

    #Get system list
    $systems = Get-HPRESTDataRaw -Href 'rest/v1/systems' -Session $session
    foreach($sys in $systems.links.member.href) # rest/v1/systems/1, rest/v1/system/2
    {
        # get boot data for the system
        $data = Get-HPRESTDataRaw -Href $sys -Session $session
        $data.Boot

        # print available boot targets
        Write-Host 'Supported boot targets are' $data.boot.BootSourceOverrideSupported
        
        if(-not($data.Boot.BootSourceOverrideSupported  -Contains $BootTarget))
        {
            # if user provided not supported then print error
            Write-Host "$BootTarget not supported"
        }
        else
        {
            # create object to PATCH
            $tempBoot = @{'BootSourceOverrideTarget'=$BootTarget}
            $OneTimeBoot = @{'Boot'=$tempBoot}

            # PATCH the data using Set-HPRESTData cmdlet
            $ret = Set-HPRESTData -Href $sys -Setting $OneTimeBoot -Session $session
            
            #process message returned by Set-HPRESTData cmdlet
            if($ret.Messages.Count -gt 0)
            {
                foreach($msgID in $ret.Messages)
                {
                    $status = Get-HPRESTError -MessageID $msgID.MessageID -MessageArg $msgID.MessageArgs -Session $session
                    $status
                }
            }

            #get and print updated value
            $bootData = Get-HPRESTDataRaw -Href $sys -Session $session
            $bootData.Boot    
        }
    }

    # disconnect the session after use
    Disconnect-HPREST -Session $session
}
## NOTE: check the boot targets supported in BootSourceOverrideSupported $data.Boot.BootSourceOverrideSupported. The value is case sensitive.
## E.g. Pxe will work, pxe will not
#Set-TempBootOrderExample6 -Address $Address -Credential $cred -BootTarget 'Hdd'

function Get-iLOMACAddressExample7
{
    param
    (
        [System.String]
        $Address,

        [PSCredential]
        $Credential
    )

    Write-Host "Example 7: Find iLO's MAC addresses"
    
    #create session
    $session = Connect-HPREST -Address $Address -Credential $Credential

    $mgr = Get-HPRESTDataRaw -Href 'rest/v1/managers' -Session $session
    foreach($hrefVal in $mgr.links.member.href) # rest/v1/systems/1, rest/v1/system/2
    {
        #Get manager data
        $managerData = Get-HPRESTDataRaw -Href $hrefVal -Session $session
        
        # retrieve ethernet NIC details
        $nicURI = $managerData.links.EthernetNICs.href
        $nicData = Get-HPRESTDataRaw -Href $nicURI -Session $session

        foreach($nic in $nicData.items)
        {
            Write-Host $managerData.Model - $nic.Name - $nic.MacAddress 
        }
    }

    # disconnect session after use
    Disconnect-HPREST -Session $session
}
#Get-iLOMACAddressExample7 -Address $Address -Credential $cred

function Add-iLOUserAccountExample8
{
# NOTE: '(400) Bad Request' error will be thrown if the user already exists
    param
    (
        [System.String]
        $Address,

        [PSCredential]
        $Credential,

        [System.String]
        $newiLOLoginName,

        [System.String]
        $newiLOUserName,

        [System.String]
        $newiLOPassword,

        [Boolean]
        $RemoteConsolePriv = $false,

        [Boolean]
        $ConfigPriv = $false,

        [Boolean]
        $VirtualMediaPriv = $false,

        [Boolean]
        $UserConfigPriv = $false,

        [Boolean]
        $VirtualPowerResetPriv = $false
    )

    Write-Host 'Example 8: Create an iLO user account.'

    #create session
    $session = Connect-HPREST -Address $Address -Credential $Credential

    # Get AccountService data to obtain Accounts href
    $accData = Get-HPRESTDataRaw -Href 'rest/v1/AccountService' -Session $session
    $accURI = $accData.links.Accounts.href

    # create iLO user object
    # add permissions
    $priv = @{}
    $priv.Add('RemoteConsolePriv',$RemoteConsolePriv)
    $priv.Add('iLOConfigPriv',$ConfigPriv)
    $priv.Add('VirtualMediaPriv',$VirtualMediaPriv)
    $priv.Add('UserConfigPriv',$UserConfigPriv)
    $priv.Add('VirtualPowerAndResetPriv',$VirtualPowerResetPriv)

    # add login name
    $hp = @{}
    $hp.Add('LoginName',$newiLOLoginName)
    $hp.Add('Privileges',$priv)
    
    $oem = @{}
    $oem.Add('Hp',$hp)

    # add username and password for access
    $user = @{}
    $user.Add('UserName',$newiLOUserName)
    $user.Add('Password',$newiLOPassword)
    $user.Add('Oem',$oem)

    # execute HTTP POST method using Invoke-HPRESTAction to add user data at Accounts href
    $ret = Invoke-HPRESTAction -Href $accURI -Data $user -Session $session
    
    # process messages returned by Invoke-HPRESTAction cmdlet
    if($ret.Messages.Count -gt 0)
    {
        foreach($msgID in $ret.Messages)
        {
            $status = Get-HPRESTError -MessageID $msgID.MessageID -MessageArg $msgID.MessageArgs -Session $session
            $status
        }
    }
    
    # Print the list of users. New user will be in this list
    $accData = Get-HPRESTDataRaw -Href $accData.links.Accounts.href -Session $session
    $accData.Items

    # disconnect session after use
    Disconnect-HPREST -Session $session
}
#Add-iLOUserAccountExample8 -Address $Address -Credential $cred -newiLOLoginName 'timh' -newiLOUserName 'TimHorton' -newiLOPassword 'timPassword123' -RemoteConsolePriv $true

function Set-iLOUserAccountExample9
{
    param
    (
        [System.String]
        $Address,

        [PSCredential]
        $Credential,

        [System.String]
        $LoginNameToModify,

        [System.String]
        $newLoginName = '',

        [System.String]
        $newUsername = '',

        [System.String]
        $newPassword = '',

        [System.Object]
        $RemoteConsolePriv = $null,

        [System.Object]
        $ConfigPriv = $null,

        [System.Object]
        $VirtualMediaPriv = $null,

        [System.Object]
        $UserConfigPriv = $null,

        [System.Object]
        $VirtualPowerResetPriv = $null
    )

    Write-Host 'Example 9: Modify an iLO user account.'

    #create session
    $session = Connect-HPREST -Address $Address -Credential $Credential

    # get the href of the iLO user accounts
    $accData = Get-HPRESTDataRaw -Href 'rest/v1/AccountService' -Session $session
    $accURI = $accData.links.Accounts.href

    $members = Get-HPRESTDataRaw -Href $accURI -Session $session
    $foundFlag = $false
    $memberURI = ''
    $user = $null

    foreach($member in $members.Items)
    {
        # check if user is present in the user list
        if($member.Username -eq $LoginNameToModify)
        {
            $foundFlag = $true
            $memberURI = $member.links.self.href
            
            # Create user object with new value(s)
            $priv = @{}
            if($RemoteConsolePriv -ne $null){$priv.Add('RemoteConsolePriv',[System.Convert]::ToBoolean($RemoteConsolePriv))}
            if($ConfigPriv -ne $null){$priv.Add('iLOConfigPriv',[System.Convert]::ToBoolean($ConfigPriv))}
            if($VirtualMediaPriv -ne $null){$priv.Add('VirtualMediaPriv',[System.Convert]::ToBoolean($VirtualMediaPriv))}
            if($UserConfigPriv -ne $null){$priv.Add('UserConfigPriv',[System.Convert]::ToBoolean($UserConfigPriv))}
            if($VirtualPowerResetPriv -ne $null){$priv.Add('VirtualPowerAndResetPriv',[System.Convert]::ToBoolean($VirtualPowerResetPriv))}

            $hp = @{}
            if($newLoginName -ne ''){$hp.Add('LoginName',$newLoginName)}
            if($priv.Count -gt 0){$hp.Add('Privileges',$priv)}
    
            $oem = @{}
            if($hp.Count -gt 0){$oem.Add('Hp',$hp)}

            $user = @{}
            if($newUserName -ne ''){$user.Add('UserName',$newUserName)}
            if($newPassword -ne ''){$user.Add('Password',$newPassword)}
            if($oem.Count -gt 0){$user.Add('Oem',$oem)}
            break
        }
    }
    if($foundFlag -eq $true)
    {
        # WARNING: If you don't change anything, you will get an HTTP 400 back
        # PATCH the data using Set-HPRESTData
        $ret = Set-HPRESTData -Href $memberURI -Setting $user -Session $session
        if($ret.Messages.Count -gt 0)
        {
            foreach($msgID in $ret.Messages)
            {
                $status = Get-HPRESTError -MessageID $msgID.MessageID -MessageArg $msgID.MessageArgs -Session $session
                $status
            }
        }
    }
    # If user name is not found, print message
    else
    {
        Write-Error "$LoginNameToModify not present"
    }

    # Disconnect session after use
    Disconnect-HPREST -Session $session
}
#Set-iLOUserAccountExample9 -Address $Address -Credential $cred -LoginNameToModify 'TimHorton' -RemoteConsolePriv $false

function Remove-iLOUserAccountExample10
{
    param
    (
        [System.String]
        $Address,

        [PSCredential]
        $Credential,

        [System.String]
        $LoginNameToRemove
    )

    Write-Host 'Example 10: Delete an iLO user account.'

    #create session
    $session = Connect-HPREST -Address $Address -Credential $Credential

    $accData = Get-HPRESTDataRaw -Href 'rest/v1/AccountService' -Session $session
    $accURI = $accData.links.Accounts.href

    $members = Get-HPRESTDataRaw -Href $accURI -Session $session
    $foundFlag = $false
    $memberURI = ''
    foreach($member in $members.Items)
    {
        # If user to delete is found in user list, note the href of that user in memberURI variable
        if($member.Username -eq $LoginNameToRemove)
        {
            $foundFlag = $true
            $memberURI = $member.links.self.href            
            break
        }
    }
    if($foundFlag -eq $true)
    {
        # If the user was found, executet the HTTP DELETE method on the href of the user to be deleted.
        $ret = Remove-HPRESTData -Href $memberURI -Session $session
        
        # process message(s) from Remove-HPRESTData cmdlet
        if($ret.Messages.Count -gt 0)
        {
            foreach($msgID in $ret.Messages)
            {
                $status = Get-HPRESTError -MessageID $msgID.MessageID -MessageArg $msgID.MessageArgs -Session $session
                $status
            }
        }

        # print list of users. Deleted user will not be present in the list
        $accData = Get-HPRESTDataRaw -Href $accData.links.Accounts.href -Session $session
        $accData.Items
    }
    else
    {
        Write-Error "$LoginNameToRemove not present"
    }

    # Disconnect session after use
    Disconnect-HPREST -Session $session
}
#Remove-iLOUserAccountExample10 -Address $Address -Credential $cred -LoginNameToRemove TimHorton

function Get-ActiveiLONICExample11
{
    param
    (
        [System.String]
        $Address,

        [PSCredential]
        $Credential
    )
    Write-Host 'Example 11: Retrieve active iLO NIC information'

    # create session
    $session = Connect-HPREST -Address $Address -Credential $Credential
    
    # retrieve manager list
    $managers = Get-HPRESTDataRaw -Href 'rest/v1/Managers' -Session $session
    foreach($manager in $managers.links.Member.href)
    {
        # retrieve manager details and the ethernetNIC href from that
        $managerData = Get-HPRESTDataRaw -Href $manager -Session $session
        $nicURI = $managerData.links.EthernetNICs.href

        # retrieve all NIC information
        $nics = Get-HPRESTDataRaw -Href $nicURI -Session $session

        # print NIC details for enabled i.e. active NIC
        foreach($nic in $nics.items)
        {
            if($nic.Status.State -eq 'Enabled')
            {
                $nic
            }
        }
    }

    # Disconnect session after use
    Disconnect-HPREST -Session $session
}
#Get-ActiveiLONICExample11 -Address $Address -Credential $cred

function Get-SessionExample12
{
    param
    (
        [System.String]
        $Address,

        [PSCredential]
        $Credential
    )
    Write-Host 'Example 12: Retrieve current session information'

    # connect session
    $session = Connect-HPREST -Address $Address -Credential $Credential

    # retrieve all sessions
    $sessions = Get-HPRESTDataRaw -Href 'rest/v1/Sessions' -Session $session
    
    #get the details of current session
    foreach($ses in $sessions.Items)
    {
        if($ses.Oem.Hp.MySession -eq $true)
        {
            $ses
            $ses.oem.hp
        }
    }

    # disconnect session after use
    Disconnect-HPREST -Session $session
}
#Get-SessionExample12 -Address $Address -Credential $cred

function Set-UIDStateExample13
{
    param
    (
        [System.String]
        $Address,

        [PSCredential]
        $Credential,

        [ValidateSet('Lit','Off')]
        [System.String]
        $UIDState # Use 'Lit' or 'Off'. Value identified by 'IndicatorLED' field in 'rest/v1/Systems/1'. The value 'Blinking' in mentioned in the schema is not settable by the user.
    )

    Write-Host 'Example 13: Change UID/IndicatorLED status'

    # connect session
    $session = Connect-HPREST -Address $Address -Credential $Credential
    
    # retrieve list of systems
    $systems = Get-HPRESTDataRaw -Href 'rest/v1/Systems' -Session $session
    foreach($sys in $systems.links.Member.href)
    {
        # get the href of the system to PATCH the Indicator LED value
        $sysData = Get-HPRESTDataRaw -Href $sys -Session $session
        $sysURI = $sysData.links.self.href

        # create hashtable object to PATCH
        $UIDSetting = @{'IndicatorLED'=$UIDState}

        # PATCH the data using Set-HPRESTData cmdlet
        $ret = Set-HPRESTData -Href $sysURI -Setting $UIDSetting -Session $session

        # process the message(s) from Set-HPRESTData
        if($ret.Messages.Count -gt 0)
        {
            foreach($msgID in $ret.Messages)
            {
                $status = Get-HPRESTError -MessageID $msgID.MessageID -MessageArg $msgID.MessageArgs -Session $session
                $status
            }
        }
    }

    # Disconnect the session after use
    Disconnect-HPREST -Session $session
}
## NOTE: UID State - Unknown, Lit, Blinking, Off. Unknown and Blinking cannot be set by user
#Set-UIDStateExample13 -Address $Address -Credential $cred -UIDState 'Off'

function Get-ComputerSystemExample14
{
    param
    (
        [System.String]
        $Address,

        [PSCredential]
        $Credential
    )
    Write-Host 'Example 14: Retrieve information of computer systems'

    # connect session
    $session = Connect-HPREST -Address $Address -Credential $Credential
    
    # retrieve list of computer systems
    $systems = Get-HPRESTDataRaw -Href 'rest/v1/Systems' -Session $session

    # print details of all computer systems
    foreach($sys in $systems.links.Member.href)
    {
        $sysData = Get-HPRESTDataRaw -Href $sys -Session $session
        $sysData
    }

    # Disconnect session after use
    Disconnect-HPREST -Session $session    
}
#Get-ComputerSystemExample14 -Address $Address -Credential $cred

function Set-VirutalMediaExample15
{
    param
    (
        [System.String]
        $Address,

        [PSCredential]
        $Credential,

        [System.Object]
        $IsoUrl = $null,

        [System.Object]
        $BootOnNextReset = $null
    )

    # NOTE: if ISO URL is blank and BootOnNextReset are blank/null, the virtual media is unmounted
    Write-Host 'Example 15 : Mount/Unmount virtual media DVD using URL'

    # Connect session
    $session = Connect-HPREST -Address $Address -Credential $Credential

    $managers = Get-HPRESTDataRaw -Href 'rest/v1/Managers' -Session $session
    foreach($mgr in $managers.links.Member.href)
    {
        
        $mgrData = Get-HPRESTDataRaw -Href $mgr -Session $session
        # Check if virtual media is supported
        if($mgrData.links.PSObject.Properties.name -Contains 'VirtualMedia' -eq $false)
        {
            # If virtual media is not present in links under manager details, print error
            Write-Host 'Virtual media not available in Manager links'
        }
        else
        {
            
            $vmhref = $mgrData.links.VirtualMedia.href
            $vmdata = Get-HPRESTDataRaw -Href $vmhref -Session $session
            foreach($vm in $vmdata.links.Member.href)
            {
                $data = Get-HPRESTDataRaw -Href $vm -Session $session
                # select the media option which contains DVD
                if($data.MediaTypes -contains 'DVD')
                {
                    # Create object to PATCH to update ISO image URI and to set
                    if($IsoUrl -eq $null)
                    {
                        $mountSetting = @{'Image'=$null}
                    }
                    else
                    {
                        $mountSetting = @{'Image'=[System.Convert]::ToString($IsoUrl)}
                    }
                    if($BootOnNextReset -ne $null -and $IsoUrl -ne $null)
                    {
                        # Create object to PATCH
                        $oem = @{'Hp'=@{'BootOnNextServerReset'=[System.Convert]::ToBoolean($BootOnNextReset)}}
                        $mountSetting.Add('Oem',$oem)
                    }
                    # PATCH the data to $vm href by using Set-HPRESTData
                    #Disconnect-HPREST -Session $session
                    $ret = Set-HPRESTData -Href $vm -Setting $mountSetting -Session $session
                    
                    # Process message(s) returned from Set-HPRESTData
                    if($ret.Messages.Count -gt 0)
                    {
                        foreach($msgID in $ret.Messages)
                        {
                            $status = Get-HPRESTError -MessageID $msgID.MessageID -MessageArg $msgID.MessageArgs -Session $session
                            $status
                        }
                    }
                    Get-HPRESTDataRaw -Href $vm -Session $session
                }
            }        
        }
    }
    # Disconnect session after use
    Disconnect-HPREST -Session $session
}
<#
# will return '(400) Bad Request' error if the virtual media is already in this state.
# IsoUrl = $null will dismount the virtual media. IsoUrl = '' will give 400 Bad Request error.
 
#unmount
Set-VirutalMediaExample15 -Address $Address -Credential $cred -IsoUrl $null -BootOnNextReset $false
 
#Mount
Set-VirutalMediaExample15 -Address $Address -Credential $cred -IsoUrl 'http://192.184.217.158/iso/Windows/Win2012/en_windows_server_2012_vl_x64_dvd_917758.iso' -BootOnNextReset $true
 
#unmount
Set-VirutalMediaExample15 -Address $Address -Credential $cred
#>


function Set-AssetTagExample16
{
    param
    (
        [System.String]
        $Address,

        [PSCredential]
        $Credential,

        [System.String]
        $AssetTag
    )
    Write-Host 'Example 16: Update AssetTag value.'

    # Connect sesion
    $session = Connect-HPREST -Address $Address -Credential $Credential
    
    # Retrieve list of systems
    $systems = Get-HPRESTDataRaw -Href 'rest/v1/Systems' -Session $session
    foreach($sys in $systems.links.Member.href)
    {
        # Get each system href by first retrieving each system data and then extracting 'Self' href from it
        $sysData = Get-HPRESTDataRaw -Href $sys -Session $session
        $sysURI = $sysData.links.self.href

        # Create hashtable object to PATCH to system href
        $assetTagSetting = @{'AssetTag'='Test111'}
        # PATCH data using Set-HPRESTData cmdlet
        $ret = Set-HPRESTData -Href $sysURI -Setting $assetTagSetting -Session $session

        # Process message(s) from Set-HPRESTData
        if($ret.Messages.Count -gt 0)
        {
            foreach($msgID in $ret.Messages)
            {
                $status = Get-HPRESTError -MessageID $msgID.MessageID -MessageArg $msgID.MessageArgs -Session $session
                $status
            }
        }
    }
    # Disconnect session after use
    Disconnect-HPREST -Session $session
}
#Set-AssetTagExample16 -Address $Address -Credential $cred -AssetTag 'Test2'

function Reset-iLOExample17
{
param
    (
        [System.String]
        $Address,

        [PSCredential]
        $Credential
    )

    Write-Host 'Example 17: Reset the iLO.'
    
    #create session
    $session = Connect-HPREST -Address $Address -Credential $Credential

    # Get list of managers
    $managers = Get-HPRESTDataRaw -Href 'rest/v1/Managers' -Session $session
    foreach($mgr in $managers.links.member.href) # rest/v1/managers/1, rest/v1/managers/2
    {
        # for possible operations on the manager check 'AvailableActions' field in manager data
        # Create hashtable object according to 'AvailableActions' to send to manager href
        $dataToPost = @{}
        $dataToPost.Add('Action','Reset')

        # Send POST request using Invoke-HPRESTAction
        Invoke-HPRESTAction -Href $mgr -Data $dataToPost -Session $session
        # resetting iLO will delete all active sessions.

    }
    #automatically closes all connections
    #Disconnect-HPREST -Session $session
}
#Reset-iLOExample17 -Address $Address -Credential $cred

function Get-iLONICExample18
{
    param
    (
        [System.String]
        $Address,

        [PSCredential]
        $Credential,

        [ValidateSet('Active','Inactive','All')]
        [System.String]
        $NICState = 'Active'
    )
    Write-Host 'Example 18: Retrieve iLO NIC information'

    # Create Session
    $session = Connect-HPREST -Address $Address -Credential $Credential
    
    # Retrieve list of managers
    $managers = Get-HPRESTDataRaw -Href 'rest/v1/Managers' -Session $session
    foreach($manager in $managers.links.Member.href)
    {
        # Retrieve manager data to extract Ethernet NIC href
        $managerData = Get-HPRESTDataRaw -Href $manager -Session $session
        $nicURI = $managerData.links.EthernetNICs.href

        # Retrieve ethernet NIC details
        $nics = Get-HPRESTDataRaw -Href $nicURI -Session $session

        # Display NIC accoring to the NICState parameter
        foreach($nic in $nics.items)
        {
            if($nic.Status.State -eq 'Enabled')
            {
                if($NICState -eq 'Active')
                {
                    $nic
                    break
                }
                if($NICState -eq 'All')
                {
                    $nic
                }
            }
            if($nic.Status.State -eq 'Disabled')
            {
                if($NICState -eq 'Inactive')
                {
                    $nic
                    break
                }
                if($NICState -eq 'All')
                {
                    $nic
                }
            }
        }
    }
    # Disconnect the session after use
    Disconnect-HPREST -Session $session
}
#Get-iLONICExample18 -Address $Address -Credential $cred -NICState Inactive

function Set-ActiveiLONICExample19
{
    param
    (
        [System.String]
        $Address,

        [PSCredential]
        $Credential,

        [Boolean]
        $SharedNIC = $false
    )
    Write-Host 'Example 19: Set the active iLO NIC'

    # Create session
    $session = Connect-HPREST -Address $Address -Credential $Credential
    
    # Retrieve list of managers
    $managers = Get-HPRESTDataRaw -Href 'rest/v1/Managers' -Session $session
    foreach($manager in $managers.links.Member.href)
    {
        
        $managerData = Get-HPRESTDataRaw -Href $manager -Session $session
        $nicHref = $managerData.links.EthernetNICs.href
        $nics = Get-HPRESTDataRaw -Href $nicHref -Session $session
        $selectedNICHref = ''
        foreach($nic in $nics.items)
        {
            if($SharedNIC -eq $true)
            {
                # if a shared NIC setting is required, then check for LOM or Flexible LOM select URI where LOM/FlexLOM is present
                if($nic.Oem.hp.SupportsFlexibleLOM -eq $null -and $nic.Oem.hp.SupportsLOM -eq $null)
                {
                    continue;
                }
                else
                {
                    if($nic.Oem.hp.SupportsFlexibleLOM -eq $true)
                    {
                        $selectedNICHref = $nic.links.self.href
                        break
                    }
                    elseif($nic.Oem.hp.SupportsLOM -eq $true)
                    {
                        $selectedNICHref = $nic.links.self.href
                        break
                    }
                    else
                    {
                        Write-Host 'Shared NIC not supported.'
                    }
                }
            }
            else #if sharedNic set to false, select the Href of NIC where LOM/FlexLOM are not present
            {
                if($nic.Oem.hp.SupportsFlexibleLOM -eq $null -and $nic.Oem.hp.SupportsLOM -eq $null)
                {
                    $selectedNICHref = $nic.links.self.href
                    break
                }
            }
        }

        if($selectedNICHref -ne '')
        {
            $req = @{'Oem'=@{'Hp'=@{'NICEnabled' = $true}}}
            $ret = Set-HPRESTData -Href $selectedNICHref -Setting $req -Session $session

            # Process message(s) returned from Set-HPRESTData cmdlet
            if($ret.Messages.Count -gt 0)
            {
                foreach($msgID in $ret.Messages)
                {
                    $status = Get-HPRESTError -MessageID $msgID.MessageID -MessageArg $msgID.MessageArgs -Session $session
                    $status
                }
            }
        }
    }

    # Disconnect the session after use
    Disconnect-HPREST -Session $session
}
#Set-ActiveiLONICExample19 -Address $Address -Credential $cred

function Get-IMLExample20
{
    param
    (
        [System.String]
        $Address,

        [PSCredential]
        $Credential
    )
    Write-Host 'Example 20: Retrieve Integrated Management Log (IML)'

    # Create session
    $session = Connect-HPREST -Address $Address -Credential $Credential
    
    # Retrieve systems list
    $systems = Get-HPRESTDataRaw -Href 'rest/v1/systems' -Session $session
    foreach($sys in $systems.links.Member.href)
    {
        # Check if logs are available
        $systemData = Get-HPRESTDataRaw -Href $sys -Session $session
        if($systemData.links.PSObject.properties.name -notcontains 'Logs')
        {
            Write-Host 'Logs not available'
        }
        else
        {
            # Retrieve the IML href
            $logURI = $systemData.links.Logs.href
            $logData = Get-HPRESTDataRaw -Href $logURI -Session $session
            $imlURI = ''
            foreach($link in $logData.links.Member.href)
            {
                $spl = $link.split('`/')
                if($spl[$spl.length-1] -match 'IML')
                {
                    $imlURI = $link
                    break
                }
            }

            # retrieve and display IML log entries
            $imlData = Get-HPRESTDataRaw -Href $imlURI -Session $session
            foreach($entryLink in $imlData.links.Entries)
            {
                $imlEntries = Get-HPRESTDataRaw -Href $entryLink.href -Session $session
                $imlEntries.Items
            }
        }
    }
    # Disconnect the session after use
    Disconnect-HPREST -Session $session
}
#Get-IMLExample20 -Address $Address -Credential $cred

function Get-iLOEventLogExample21
{
    param
    (
        [System.String]
        $Address,

        [PSCredential]
        $Credential
    )
    Write-Host 'Example 21: Retrieve iLO Event Log'

    # Create session
    $session = Connect-HPREST -Address $Address -Credential $Credential
    $managers = Get-HPRESTDataRaw -Href 'rest/v1/managers' -Session $session
    foreach($mgr in $managers.links.Member.href)
    {
        $managerData = Get-HPRESTDataRaw -Href $mgr -Session $session
        if($managerData.links.PSObject.properties.name -notcontains 'Logs')
        {
            Write-Host 'Logs not available'
        }
        else
        {
            # get the href for iLO event logs
            $logURI = $managerData.links.Logs.href
            $logData = Get-HPRESTDataRaw -Href $logURI -Session $session
            $imlURI = ''
            foreach($link in $logData.links.Member.href)
            {
                $spl = $link.split('`/')
                if($spl[$spl.length-1] -match 'IEL')
                {
                    $ielURI = $link
                    break
                }
            }

            # Retrieve and display the log entries
            $ielData = Get-HPRESTDataRaw -Href $ielURI -Session $session
            foreach($entryLink in $ielData.links.Entries)
            {
                $ielEntries = Get-HPRESTDataRaw -Href $entryLink.href -Session $session
                $ielEntries.Items
            }
        }
    }
    # Disconnect the session after use
    Disconnect-HPREST -Session $session
}
#Get-iLOEventLogExample21 -Address $Address -Credential $cred

function Clear-IMLExample22
{
    param
    (
        [System.String]
        $Address,

        [PSCredential]
        $Credential
    )
    Write-Host 'Example 22: Clear Integrated Management Log'

    # Create session
    $session = Connect-HPREST -Address $Address -Credential $Credential
    $systems = Get-HPRESTDataRaw -Href 'rest/v1/systems' -Session $session
    foreach($sys in $systems.links.Member.href)
    {
        # check if logs are available or not
        $systemData = Get-HPRESTDataRaw -Href $sys -Session $session
        if($systemData.links.PSObject.properties.name -notcontains 'Logs')
        {
            Write-Host 'Logs not available'
        }
        else
        {
            # extract href href for IML
            $logURI = $systemData.links.Logs.href
            $logData = Get-HPRESTDataRaw -Href $logURI -Session $session
            $imlURI = ''
            foreach($link in $logData.links.Member.href)
            {
                $spl = $link.split('`/')
                if($spl[$spl.length-1] -match 'IML')
                {
                    $imlURI = $link
                    break
                }
            }
            
            # Create hashtable object to invoke action to clear logs
            # Check 'AvailableActions' for values in this hashtable object
            $action = @{'Action'='ClearLog'}
            
            # POST the object using Invoke-HPRESTAction cmdlet
            $ret = Invoke-HPRESTAction -Href $imlURI -Data $action -Session $session

            # Process message(s) returned from Invoke-HPRESTAction cmdlet
            if($ret.Messages.Count -gt 0)
            {
                foreach($msgID in $ret.Messages)
                {
                    $status = Get-HPRESTError -MessageID $msgID.MessageID -MessageArg $msgID.MessageArgs -Session $session
                    $status
                }
            }
        }
    }

    # Disconnect the session after use
    Disconnect-HPREST -Session $session
}
<#
Clear-IMLExample22 -Address $Address -Credential $cred
Get-IMLExample20 -Address $Address -Credential $cred
#>


function Clear-iLOEventLogExample23
{
    param
    (
        [System.String]
        $Address,

        [PSCredential]
        $Credential
    )
    Write-Host 'Example 23: Clear iLO Event Log'

    # Create session
    $session = Connect-HPREST -Address $Address -Credential $Credential
    
    # Retrieve manager list
    $managers = Get-HPRESTDataRaw -Href 'rest/v1/managers' -Session $session
    foreach($mgr in $managers.links.Member.href)
    {
        $managerData = Get-HPRESTDataRaw -Href $mgr -Session $session
        # check if logs are available or not
        if($managerData.links.PSObject.properties.name -notcontains 'Logs')
        {
            Write-Host 'Logs not available'
        }
        else
        {
            # get the href for iLO event logs
            $logURI = $managerData.links.Logs.href
            $logData = Get-HPRESTDataRaw -Href $logURI -Session $session
            $ielURI = ''
            foreach($link in $logData.links.Member.href)
            {
                $spl = $link.split('`/')
                if($spl[$spl.length-1] -match 'IEL')
                {
                    $ielURI = $link
                    break
                }
            }

            # Create hashtable object to invoke action to clear logs
            # Check 'AvailableActions' for values in this hashtable object
            $action = @{'Action'='ClearLog'}

            # POST the object using Invoke-HPRESTAction cmdlet
            $ret = Invoke-HPRESTAction -Href $ielURI -Data $action -Session $session

            # Process message(s) returned from Invoke-HPRESTAction cmdlet
            if($ret.Messages.Count -gt 0)
            {
                foreach($msgID in $ret.Messages)
                {
                    $status = Get-HPRESTError -MessageID $msgID.MessageID -MessageArg $msgID.MessageArgs -Session $session
                    $status
                }
            }
        }
    }

    # Disconnect the session after use
    Disconnect-HPREST -Session $session
}
<#
Clear-iLOEventLogExample23 -Address $Address -Credential $cred
Get-iLOEventLogExample21 -Address $Address -Credential $cred
#>


function Set-SNMPExample24
{
    param
    (
        [System.String]
        $Address,

        [PSCredential]
        $Credential,

        [System.String]
        $Mode, # Agentless or Passthru

        [System.Object]
        $AlertsEnabled = $null #use true or false only


    )
    Write-Host 'Example 24: Configure iLO SNMP settings.'

    # Create session
    $session = Connect-HPREST -Address $Address -Credential $Credential
    
    # retrieve list of managers
    $managers = Get-HPRESTDataRaw -Href 'rest/v1/Managers' -Session $session
    foreach($mgr in $managers.links.Member.href)
    {
        # retrieve settings of NetworkService data
        $mgrData = Get-HPRESTDataRaw -Href $mgr -Session $session
        $netSerURI = $mgrData.links.NetworkService.href
        $netSerData = Get-HPRESTDataRaw -Href $netSerURI -Session $session
        if($netSerData.links.PSObject.properties.name -notcontains 'SNMPService')
        {
            Write-Host 'SNMP services not available in Manager Network Service'
        }
        else
        {
            # create hashtable object according to the parameters provided by user
            $snmpSerURI = $netSerData.links.SNMPService.href
            $snmpSetting = @{}
            if($mode -ne '' -and $Mode -ne $null)
            {
                $snmpSetting.Add('Mode',$Mode)
            }
            if($AlertsEnabled -ne $null)
            {
                $snmpSetting.Add('AlertsEnabled',[System.Convert]::ToBoolean($AlertsEnabled))
            }

            # PATCh the settings using Set-HPRESTData cmdlet
            $ret = Set-HPRESTData -Href $snmpSerURI -Setting $snmpSetting -Session $session

            # Process message(s) returned from Set-HPRESTData cmdlet
            if($ret.Messages.Count -gt 0)
            {
                foreach($msgID in $ret.Messages)
                {
                    $status = Get-HPRESTError -MessageID $msgID.MessageID -MessageArg $msgID.MessageArgs -Session $session
                    $status
                }
            }
        }
    }
    # Disconnect the session after use
    Disconnect-HPREST -Session $session
}
#Set-SNMPExample24 -Address $Address -Credential $cred -Mode Agentless -AlertsEnabled $true
 
function Get-SchemaExample25
{
    param
    (
        [System.String]
        $Address,

        [PSCredential]
        $Credential,

        [System.String]
        $Type,

        [ValidateSet('en','jp','zh')]
        [System.String]
        $Language = 'en'


    )

    Write-Host 'Example 25: Retrieve schema'

    # Create session
    $session = Connect-HPREST -Address $Address -Credential $Credential
    
    # Retrieve the schema with the Type provided by the user
    $sch = Get-HPRESTSchema -Type $Type -Language $Language -Session $session
    $sch.properties
    
    # Disconnect the session after use
    Disconnect-HPREST -Session $session

}
#Get-SchemaExample25 -Address $Address -Credential $cred -Type ComputerSystem

function Get-RegistryExample26
{
    param
    (
        [System.String]
        $Address,

        [PSCredential]
        $Credential,

        [System.String]
        $RegistryPrefix,

        [System.String]
        $Language = 'en'


    )

    Write-Host 'Example 26: Retrieve registry'

    # Create session
    $session = Connect-HPREST -Address $Address -Credential $Credential
    
    # retrieve list of registries
    $reg = Get-HPRESTDataRaw -href rest/v1/registries -Session $session

    # select the registry where the prefix is same as value provided by user in 'RegistryPrefix' parameter
    $reqRegList = $reg.Items | ? {$_.Schema.ToString().IndexOf($RegistryPrefix) -eq 0}
    
    # retrieve and display the external reference for the required language
    foreach($reqReg in $reqRegList)
    {
        $reqRegURI = ($reqReg.Location|?{$_.Language -eq $Language}).uri.extref
        $reqRegData = Get-HPRESTDataRaw -Href $reqRegURI -Session $session
        $reqRegData
    }
    # Disconnect the session after use
    Disconnect-HPREST -Session $session

}
#Get-RegistryExample26 -Address $Address -Credential $cred -RegistryPrefix HpBiosAttributeRegistryP89

function Set-TimeZoneExample27
{
    param
    (
        [System.String]
        $Address,

        [PSCredential]
        $Credential,

        [System.String]
        $TimeZone
    )

    #NOTE: This will work only if iLO is NOT configured to take time settings from DHCP v4 or v6. Otherwise, error 400 - bad request is thrown.
    Write-Host 'Example 27: Set timezone'

    # Create session
    $session = Connect-HPREST -Address $Address -Credential $Credential
    
    # retrieve manager list
    $managers = Get-HPRESTDataRaw -href rest/v1/managers -Session $session
    foreach($mgr in $managers.links.Member.href)
    {
        # Retrieve DateTimeService href and timezone name to display to user
        $mgrData = Get-HPRESTDataRaw -href $mgr -Session $session
        $dtsURI = $mgrData.Oem.Hp.links.DateTimeService.href
        $dtsData = Get-HPRESTDataRaw -Href $dtsURI -Session $session
        $currTimeZone = $dtsData.TimeZone.Name
        Write-Host "Current timezone $currTimeZone"

        # from list of all timezone, first check if the user entered value is present in this list.
        foreach($tz in $dtsData.TimeZoneList)
        {
            if($tz.Name -eq $TimeZone)
            {
                # User entered timezone value is present.
                # Create timezone hashtable object to PATCH
                $setting = @{'TimeZone'=@{'Name'=$tz.name}}
                
                # PATCH the new setting using Set-HPRESTData cmdlet
                $ret = Set-HPRESTData -Href $dtsURI -Setting $setting -Session $session

                # Process message(s) returned from Set-HPRESTData cmdlet
                if($ret.Messages.Count -gt 0)
                {
                    foreach($msgID in $ret.Messages)
                    {
                        $status = Get-HPRESTError -MessageID $msgID.MessageID -MessageArg $msgID.MessageArgs -Session $session
                        $status
                    }
                }
                break
            }
        }
    }

    # Disconnect the session after use
    Disconnect-HPREST -Session $session
}
## Patch using Timezone name is preferred over timezone index. If both are patched, Index field will be ignored
## DHCPv4 should be disabled in active NIC for setting the timezone
#Set-TimeZoneExample27 -Address $Address -Credential $cred -TimeZone 'America/Chicago'

function Set-iLONTPServerExample28
{
    param
    (
        [System.String]
        $Address,

        [PSCredential]
        $Credential,

        [System.Array]
        $StaticNTPServer
    )

    #NOTE: This will work only if iLO is NOT configured to take time settings from DHCP v4 or v6. Otherwise, error 400 - bad request is thrown.
    Write-Host 'Example 28: Set NTP server'

    # Create session
    $session = Connect-HPREST -Address $Address -Credential $Credential
    
    # Retrieve manager list
    $managers = Get-HPRESTDataRaw -href rest/v1/managers -Session $session
    foreach($mgr in $managers.links.Member.href)
    {
        # retrieve date time details and display current values
        $mgrData = Get-HPRESTDataRaw -Href $mgr -Session $session
        $dtsURI = $mgrData.Oem.Hp.links.DateTimeService.href
        $dtsData = Get-HPRESTDataRaw -Href $dtsURI -Session $session
        Write-Host Current iLO Date and Time setting - $dtsData.ConfigurationSettings
        Write-Host Current iLO NTP Servers - $dtsData.NTPServers

        # Create hashtable object with values for NTPServer
        $setting = @{'StaticNTPServers'=$StaticNTPServer}

        # PATCH new NTPServer data using Set-HPRESTData
        $ret = Set-HPRESTData -Href $dtsURI -Setting $setting -Session $session

        # Process message(s) returned from Set-HPRESTData cmdlet
        if($ret.Messages.Count -gt 0)
        {
            foreach($msgID in $ret.Messages)
            {
                $status = Get-HPRESTError -MessageID $msgID.MessageID -MessageArg $msgID.MessageArgs -Session $session
                $status
            }
        }
    }

    # Disconnect the session after use
    Disconnect-HPREST -Session $session
}
## DHCPv4 should be disabled in active NIC for setting the StaticNTPServer
#Set-iLONTPServerExample28 -Address $Address -Credential $cred -StaticNTPServer @('192.168.0.1','192.168.0.2')

function Get-PowerMetricExample29
{
    param
    (
        [System.String]
        $Address,

        [PSCredential]
        $Credential
    )

    #NOTE: This will work only if iLO is NOT configured to take time settings from DHCP v4 or v6
    Write-Host 'Example 29: Retrieve PowerMetrics average watts'

    # Create session
    $session = Connect-HPREST -Address $Address -Credential $Credential
    
    # retrieve chassis list
    $chassis = Get-HPRESTDataRaw -href rest/v1/chassis -Session $session
    foreach($cha in $chassis.links.member.href)
    {
        # get PowerMetrics href, retrieve the data and display
        $chaData = Get-HPRESTDataRaw -Href $cha -Session $session
        $pmURI = $chaData.links.PowerMetrics.href
        $pmData = Get-HPRESTDataRaw -Href $pmURI -Session $session
        $pm = $pmData.PowerMetrics
        Write-Host $chaData.Model AverageConsumedWatts = $pm.AverageConsumedWatts watts over a $pm.IntervalInMin minute moving average
    }

    # Disconnect the session after use
    Disconnect-HPREST -Session $session
}
#Get-PowerMetricExample29 -Address $Address -Credential $cred

function Get-BiosDependenciesExample30
{
    param
    (
        [System.String]
        $Address,

        [PSCredential]
        $Credential
    )

    Write-Host 'Example 30: Get BIOS dependencies.'

    $attRegFromBios = ''
    $attRegLoc = ''
    $registries = $null

    #create session
    $session = Connect-HPREST -Address $Address -Credential $Credential

    $sysList = Get-HPRESTDataRaw -Href 'rest/v1/systems' -Session $session
    $registries = Get-HPRESTDataRaw -Href $session.RootData.links.Registries.href -Session $session
    foreach($sys in $syslist.links.member.href)
    {
        # Get the Attribute registry version from BIOS settings
        $sysData = Get-HPRESTDataRaw -Href $sys -Session $session
        $biosURI = $sysData.Oem.Hp.links.BIOS.href
        
        # get BIOS data
        $biosData = Get-HPRESTDataRaw -Href $biosURI -Session $session
        $attRegFromBios = $biosData.AttributeRegistry

        # get the atttribute registry that matched the BIOS settings
        foreach($reg in $registries.items)
        {
            if($reg.Schema -eq $attRegFromBios)
            {
                $attRegLoc = $reg.Location|Where-Object{$_.Language -eq 'en'}|%{$_.uri.extref}

                # Display the dependencies from the registry entries
                $attReg = Get-HPRESTDataRaw -Href $attRegLoc -Session $session
                $attReg.RegistryEntries.Dependencies

                break
            }
        }
    }
    
    # Disconnect the session after use
    Disconnect-HPREST -Session $session
}
#Get-BiosDependenciesExample30 -Address $Address -Credential $cred

function Set-TPMExample31
{
    param
    (
        [System.String]
        $Address,

        [PSCredential]
        $Credential,

        [System.String]
        $TPMProperty, # TpmType, TpmState, TPMOperation, TpmVisibility, Tpm2Operation -Tpm2Visibility, Tpm2Ppi, TpmBinding, TpmUefiOpromMeasuring.
        #These property names may be present or not based on the system configuration.

        [System.String]
        $Value
<#
## ValueName is the value to be used in REST interface
## ValueDisplayName is seen in RBSU menu options
 
TpmType -
ValueName ValueDisplayName
--------- ----------------
NoTpm No TPM
Tpm12 TPM 1.2
Tpm20 TPM 2.0
Tcm10 TCM 1.0
 
 
TpmState
ValueName ValueDisplayName
--------- ----------------
NotPresent Not Present
PresentDisabled Present and Disabled
PresentEnabled Present and Enabled
 
TPMOperation
ValueName ValueDisplayName
--------- ----------------
NoAction No Action
Enable Enable
Disable Disable
Clear Clear
 
TpmVisibility
ValueName ValueDisplayName
--------- ----------------
Hidden Hidden
Visible Visible
 
Tpm2Operation
ValueName ValueDisplayName
--------- ----------------
NoAction No Action
Clear Clear
 
 
Tpm2Visibility,
ValueName ValueDisplayName
--------- ----------------
Hidden Hidden
Visible Visible
 
 
Tpm2Ppi
ValueName ValueDisplayName
--------- ----------------
Enabled Enabled
Disabled Disabled
 
 
TpmBinding
ValueName ValueDisplayName
--------- ----------------
Enabled Enabled
Disabled Disabled
 
 
TpmUefiOpromMeasuring
ValueName ValueDisplayName
--------- ----------------
Enabled Enabled
Disabled Disabled
 
 
#>


    )

    Write-Host 'Example 31: Change TPM 2.0 Setting'
    
    #create session
    $session = Connect-HPREST -Address $Address -Credential $Credential

    #Get BIOS URI
    $sys = Get-HPRESTDataRaw -Href 'rest/v1/systems' -Session $session
    foreach($hrefVal in $sys.links.member.href) # rest/v1/systems/1, rest/v1/system/2
    {
        $data = Get-HPRESTDataRaw -Href $hrefVal -Session $session
        $biosURI = $data.Oem.Hp.links.BIOS.href
    
        #get AttributeRegistry value from BIOS Data
        $biosData = Get-HPRESTDataRaw -Href $biosURI -Session $session
        $biosData
        $ar = $biosData.AttributeRegistry

        # get attribute registries and select the one that matches BIOS data attribute registry
        $reg = Get-HPRESTDataRaw -Href 'rest/v1/registries' -Session $session
        
        #if property to be modified is not present in the bios data, then print error message and return
        if(-not(($biosData|Get-Member).Name -Contains $TPMProperty))
        {
            Write-Host "Property $TPMProperty is not supported on this system"
        }
        else
        {
            #Get setting href to update bios property. For bios, property can be updated in the settings href only. other data may not have setting href
            $biosSettingURI = $biosData.links.settings.href

            # Create hashtable object with TPM property and value to PATCH
            $tpmSetting = @{$TPMProperty=$Value}

            # PATCH TPM setting using Set-HPRESTData
            $ret = Set-HPRESTData -Href $biosSettingURI -Setting $tpmSetting -Session $session

            # Process message(s) returned from Set-HPRESTData cmdlet
            if($ret.Messages.Count -gt 0)
            {
                foreach($msgID in $ret.Messages)
                {
                    $status = Get-HPRESTError -MessageID $msgID.MessageID -MessageArg $msgID.MessageArgs -Session $session
                    $status
                }
            }
        }
    }
       
    # Disconnect the session after use
    Disconnect-HPREST -Session $session
}
<#
Set-TPMExample31 -Address $Address -Credential $cred -TPMProperty Tpm2Visibility -Value Hidden
Reset-ServerExample2 -Address $Address -Credential $cred -Action Reset -PropertyName ResetType -PropertyValue ForceRestart
#>


function Get-TPMExample32
{
    param
    (
        [System.String]
        $Address,

        [PSCredential]
        $Credential,

        [ValidateSet('All', 'TpmType', 'TpmState', 'TPMOperation', 'TpmVisibility', 'Tpm2Operation', 'Tpm2Visibility', 'Tpm2Ppi', 'TpmBinding', 'TpmUefiOpromMeasuring')]
        [System.String]
        $TPMProperty = 'All'
    )

    Write-Host 'Example 32: Get TPM Setting'
    
    #create session
    $session = Connect-HPREST -Address $Address -Credential $Credential

    #Get BIOS URI
    $sys = Get-HPRESTDataRaw -Href 'rest/v1/systems' -Session $session
    foreach($hrefVal in $sys.links.member.href) # rest/v1/systems/1, rest/v1/system/2
    {
        $data = Get-HPRESTDataRaw -Href $hrefVal -Session $session
        $biosURI = $data.Oem.Hp.links.BIOS.href
    
        #get AttributeRegistry value from BIOS Data
        $biosData = Get-HPRESTDataRaw -Href $biosURI -Session $session
        $ar = $biosData.AttributeRegistry

        # get attribute registries and select the one that matches BIOS data attribute registry
        $reg = Get-HPRESTDataRaw -Href 'rest/v1/registries' -Session $session
        $selectedReg = $null
        foreach($x in $reg.Items)
        {
            if($x.Schema -eq $ar)
            {
                $selectedReg = $x
            }
        }
        if($selectedReg -eq $null)
        {
            Write-Host 'No valid registry available for BIOS/TPM settings'
        }
        else
        {
            # Display TMP registry entries
            $attReg = Get-HPRESTDataRaw -Href ($selectedReg.Location|?{$_.Language -eq 'en'}|%{$_.URI.extref}) -Session $session

            if($TPMProperty -eq 'All')
            {
                $tpmDetails = $attReg.RegistryEntries.Attributes | ?{$_.name -match 'TPM'}
                $tpmDetails
            }
            else
            {
                $tpmDetails = $attReg.RegistryEntries.Attributes | ?{$_.name -match $TPMProperty}
                if(-not(($biosData|Get-Member).Name -Contains $TPMProperty))
                {
                    Write-Host "Property $TPMProperty is not supported on this system"
                }
                else
                {
                    $tpmDetails
                }
            }
        }
    }
       
    # Disconnect the session after use
    Disconnect-HPREST -Session $session
}
#Get-TPMExample32 -Address $Address -Credential $cred -TPMProperty TpmBinding

function Get-ThermalMetricsExample33
{
    param
    (
        [System.String]
        $Address,

        [PSCredential]
        $Credential
    )

    Write-Host 'Example 33: Get Temperature and Fan details from Thermal Metrics.'
    
    #create session
    $session = Connect-HPREST -Address $Address -Credential $Credential

    #retrieve Chassis list
    $chassisList = Get-HPRESTDataRaw -Href rest/v1/chassis -Session $session
    foreach($mem in $chassisList.links.Member)
    {
        $chasis = Get-HPRESTDataRaw -Href $mem.href -Session $session
        
        # get the thermal metrics of the chassis
        $thermalMetrics = Get-HPRESTDataRaw -Href $chasis.links.ThermalMetrics.href -Session $session
        
        # display temperature values
        Write-Host "Temperature: "
        $temps = $thermalMetrics.Temperatures
        $temps
        
        # display fan values
        Write-Host "Fans: "
        $fans = $thermalMetrics.Fans
        $fans
    }
    Disconnect-HPREST -Session $session
}
#Get-ThermalMetricsExample33 -Address $Address -Credential $cred

function Set-BIOSPowerOnPassword34
{
    param
    (
        [System.String]
        $Address,

        [PSCredential]
        $Credential,

        [System.String]
        $OldPowerOnPassword = '',

        [System.String]
        $NewPowerOnPassword
    )

    Write-Host 'Example 34: Change BIOS Password'
    
    #create session
    $session = Connect-HPREST -Address $Address -Credential $Credential

    #Get list of systems
    $systems = Get-HPRESTDataRaw -Href 'rest/v1/systems' -Session $session
    foreach($sys in $systems.links.member.href) # rest/v1/systems/1, rest/v1/system/2
    {
        #Get BIOS URI from system data
        $data = Get-HPRESTDataRaw -Href $sys -Session $session
        $biosURI = $data.Oem.Hp.links.BIOS.href
    
        #get BIOS Data
        $biosData = Get-HPRESTDataRaw -Href $biosURI -Session $session

        #if property to be modified is not present in the bios data, then print error message and return
        #Get setting href to update bios property. For bios, property can be updated in the settings href only. Other data may or may not have setting href

        #creating setting object
        # provide old and new BIOS password values for the respective fields
        $biosSetting = @{}
        $biosSetting.Add("OldPowerOnPassword",$OldPowerOnPassword)
        $biosSetting.Add("PowerOnPassword",$NewPowerOnPassword)
            
        Function Get-StringSHA256Hash
        { 
            param (
              [parameter(Mandatory=$true)] [String] $String
           )
            $StringBuilder = New-Object System.Text.StringBuilder
            [System.Security.Cryptography.HashAlgorithm]::Create('SHA256').ComputeHash([System.Text.Encoding]::UTF8.GetBytes($String))|%{ 
            [Void]$StringBuilder.Append($_.ToString("X2"))
            }
            $StringBuilder.ToString()
        }

        if($OldPowerOnPassword -ne "" -and $OldPowerOnPassword -ne $null)
        {
            $rsa256Pwd = Get-StringSHA256Hash -String $OldPowerOnPassword
            $header = @{}
            $header.Add('X-HPRESTFULAPI-AuthToken',$rsa256Pwd)

            #updating setting in system bios settings
            $ret = Set-HPRESTData -Href $biosURI -Setting $biosSetting -Session $session -Header $header
        }
        else
        {
            #updating setting in system bios settings
            $ret = Set-HPRESTData -Href $biosURI -Setting $biosSetting -Session $session
        }

        # processing message obtained by executing Set- cmdlet
        if($ret.Messages.Count -gt 0)
        {
            foreach($msgID in $ret.Messages)
            {
                $status = Get-HPRESTError -MessageID $msgID.MessageID -MessageArg $msgID.MessageArgs -Session $session
                $status
            }
        }
    }

    # disconnecting the session after use
    Disconnect-HPREST -Session $session
}

<#
##If the old BIOS password is not set:
#Set-BIOSPowerOnPassword34 -Address $Address -Credential $cred -OldPowerOnPassword '' -NewPowerOnPassword 'passwd123'
##reset makes the BIOS password setting effective
#Reset-ServerExample2 -Address $Address -Credential $cred -Action Reset -PropertyName ResetType -PropertyValue ForceRestart
 
 
##If an old BIOS password exists and has to be updated:
#Set-BIOSPowerOnPassword34 -Address $Address -Credential $cred -OldPowerOnPassword 'passwd123' -NewPowerOnPassword 'newpasswd'
##reset makes the BIOS password setting effective
#Reset-ServerExample2 -Address $Address -Credential $cred -Action Reset -PropertyName ResetType -PropertyValue ForceRestart
 
 
##To remove bios password, provide existing password as old password and a blank value for the new password:
#Set-BIOSPowerOnPassword34 -Address $Address -Credential $cred -OldPowerOnPassword 'newpasswd' -NewPowerOnPassword ''
##reset makes the BIOS password setting effective
#Reset-ServerExample2 -Address $Address -Credential $cred -Action Reset -PropertyName ResetType -PropertyValue ForceRestart
#>


function Get-AHSLogsExample35
{
    param
    (
        [System.String]
        $Address,

        [System.String]
        $OutputAHSFile,

        [PSCredential]
        $Credential
    )

    Write-Host 'Example 35: Download AHS logs.'
    
    #create session
    $session = Connect-HPREST -Address $Address -Credential $Credential

    #retrieve Chassis list
    $managerList = Get-HPRESTDataRaw -Href 'rest/v1/Managers' -Session $session
    foreach($mem in $managerList.links.Member)
    {
        $manager = Get-HPRESTDataRaw -Href $mem.href -Session $session
        $ahsHref = $manager.Oem.Hp.links.ActiveHealthSystem.href

        # get the Href for AHS logs
        $ahsData = Get-HPRESTDataRaw -Href $ahsHref -Session $session
        $ahsLogHref = $ahsData.links.AHSLocation.extref
        
        # get the AHS logs in ByteArray format
        $ahsLogs = Get-HPRESTDataRaw -Href $ahsLogHref -Session $session -OutputType 'ByteArray'

        # AHS logs are stored in the specified filename
        [System.IO.File]::WriteAllBytes($OutputAHSFile, $ahsLogs)

    }
    Disconnect-HPREST -Session $session
}
#Get-AHSLogsExample35 -Address $Address -OutputAHSFile 'c:\ahsLogsOutput.ahs' -Credential $cred

function Update-FirmwareExample36
{
    param(
        [System.String]
        [parameter(Mandatory=$true)]
        $Address = '',

        [PSCredential]
        $Credential,

        [System.String]
        [parameter(Mandatory=$true)]
        $FirmwareURI = '',

        [switch]
        [parameter(Mandatory=$false)]
        $TPMOverride
    )

    if($null -eq $FirmwareURI -or $FirmwareURI -eq '')
    {
        throw $([string]::Format($(Get-Message('MSG_PARAMETER_MISSING')) ,'FirmwareURI'))
    }

    if($null -eq $Address -or $Address -eq '')
    {
        throw $([string]::Format($(Get-Message('MSG_PARAMETER_MISSING')) ,'Address'))
    }

    Write-Host 'Example 36: Update Firmware'
    
    # create session
    $session = Connect-HPREST -Address $Address -Credential $Credential

    # getting managers list
    $managers = Get-HPRESTDataRaw -Href 'rest/v1/Managers' -Session $session
    foreach($manager in $managers.links.Member){
        
        # retrieve update service href
        $managerData = Get-HPRESTDataRaw -Href $manager.href -Session $session
        $updateURI = $managerData.oem.Hp.links.UpdateService.href
        
        #Creating payload
        $dataToPost = @{}
        $dataToPost.Add('Action','InstallFromURI')
        $dataToPost.Add('FirmwareURI',$FirmwareURI)
        $dataToPost.Add('TPMOverrideFlag', $TPMOverride.IsPresent)
    
        # Sending update request to system using 'POST' in Invoke-HPRESTAction
        $ret = Invoke-HPRESTAction -Href $updateURI -Data $dataToPost -Session $session

        # processing message obtained by executing Set- cmdlet
        if($ret.Messages.Count -gt 0)
        {
            foreach($msgID in $ret.Messages)
            {
                $status = Get-HPRESTError -MessageID $msgID.MessageID -MessageArg $msgID.MessageArgs -Session $session
                $status
            }
        }
    }

    Disconnect-HPREST -Session $session    
}
## Update iLO, ROM, System Programmable Logic Device, or SL/XL chassis firmware using this example. Provide the path on the network share or web server location in the -FirmwareURI parameter
#Update-FirmwareExample36 -Address $Address -FirmwareURI 'http://192.168.10.11/firmware/iLO4/ilo4_240_p24_checked.bin' -TPMOverride -Credential $cred

Enable-HPRESTCertificateAuthentication
# SIG # Begin signature block
# MIIjpgYJKoZIhvcNAQcCoIIjlzCCI5MCAQExDzANBglghkgBZQMEAgEFADB5Bgor
# BgEEAYI3AgEEoGswaTA0BgorBgEEAYI3AgEeMCYCAwEAAAQQH8w7YFlLCE63JNLG
# KX7zUQIBAAIBAAIBAAIBAAIBADAxMA0GCWCGSAFlAwQCAQUABCAIUNvLzmngtZzB
# IRKRhi6I9entZbHHnk52nrILi41aRaCCHrIwggPuMIIDV6ADAgECAhB+k+v7fMZO
# WepLmnfUBvw7MA0GCSqGSIb3DQEBBQUAMIGLMQswCQYDVQQGEwJaQT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