Skip to content

PowerShell UCS PowerTool to see UCS NTP Server

Wanted to see the NTP servers configured for a UCS. If anyone wants to edit up a version that can read a list of UCS IP’s and report back all NTP servers per UCS, that would rock. Thanks!

Hope this helps someone on their path towards enlightenment.

#

# Check module dependencies

#

if ((Get-Module |where {$_.Name -ilike “CiscoUcsPS”}).Name -ine “CiscoUcsPS”)

{

Write-Host “Loading Module: Cisco UCS PowerTool Module”

Import-Module CiscoUcsPs

}

$UcsmAddress = “172.16.0.1”

#Get Credentials

$Creds = Get-Credential

 

#define UCS connection

$UCSMHandle = Connect-Ucs $UcsmAddress $creds #Connect to the UCS

 

#Get NTP Server

Get-UcsNtpServer -Ucs $UCSMHandle


 

OUTPUT:

 

AdminState   : enabled
Descr        :
Hostname     :
Name         : 172.16.0.2
Dn           : sys/svc-ext/datetime-svc/ntp-172.16.0.2
Rn           : ntp-172.18.10.103
Status       :
XtraProperty : {}
Ucs          : ucshdp

AdminState   : enabled
Descr        :
Hostname     :
Name         : 172.16.0.3
Dn           : sys/svc-ext/datetime-svc/ntp-172.16.0.3
Rn           : ntp-172.23.200.98
Status       :
XtraProperty : {}
Ucs          : ucshdp

 

This is also posted on Cisco Support Communities https://communities.cisco.com/message/186410#186410

Published inPowerShellPowerTool

Be First to Comment

Leave a Reply

Your email address will not be published. Required fields are marked *