Skip to content

Instantly share code, notes, and snippets.

What would you like to do?
Set the current IP address of a device as Last IP in the UMS (feature to do so in the UMS itself was removed)
# Install-Module -Name PSIGEL
$PSDefaultParameterValues = @{
'*-UMS*:Computername' = 'igelrmserver'
'New-UMSAPICookie:Credential' = (Get-Credential)
$PSDefaultParameterValues += @{
'*-UMS*:WebSession' = New-UMSAPICookie -ErrorAction Stop
$Name = Read-Host -Prompt "Enter the name of the Device"
$CurrentIP = Read-Host -Prompt "Enter the current IP address of the Device"
(Get-UMSDevice).where{ $_.Name -eq $Name }[0] |
Update-UMSDevice -LastIP $CurrentIP
[PS> c:\SetDeviceLastIp.ps1
PowerShell credential request
Enter your credentials.
User: igelums
Password for user igelums: *******
Enter the name of the Device: L-DIS-012
Enter the current IP address of the Device:
Message Id
------- --
Update successful. 522
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment