cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
15092
Views
2
Helpful
17
Replies

UCS PowerTool + Multi UCS Domains + Health Check Script

jimstehlik
Level 1
Level 1

Hello All,

I found this great script by Jeff Silberman that performs an extensive UCS Health Check.  I've attached the script for reference.  The question I have is I have been trying to modify it so that I can execute it on mulitple UCS domains at one time and create an output file for each domain in the format as follows:

'C:\Output\${ucs}-${yyyy}${MM}&{dd}-${HH}${mm}-HealthCheck.html'

Any and all assitance will be greatly appreciated.

Thank you,

Jim

17 Replies 17

hetalsoni
Level 1
Level 1

Great Script...

robbeck
Cisco Employee
Cisco Employee

I have a similar script I'm developing that supports multiple domains as well as credential caching and automated execution.  If you are interested in testing it out please let me know.

Can you share the script with me i would like to test it for multiple Domains.

I actually just posted this as part of the UCS scripting competition.  Feel free to reach out to me if you have any questions.

UCS HealthCheck v2.1

Thanks

Hi Robbeck,

Can you help me to automate this health check report to run on daily for all UCS domains.


Rizwan,

To automate it, (this is how I did it), you use a server or workstation that has PowerShell installed.  Set up a Scheduled task to run your Healthcheck PowerShell script.  Of course, this machine has to be on 24/7, or at least when you schedule the task or it won't execute.

Thanks,

Jim

Jim nailed it.  Setup a scheduled task on a windows box that is preferentially always on.  Be sure to cache your login credentials before scheduling the task and have the credentials in the same directory as the script.

Once you have your credentials cached use the following syntax

.\UCS_Health_Check_v2.1.ps1 -UseCached -RunReport -Silent -Email

Only pass the email argument if you want a copy of the report emailed to you (be sure to edit the email script variables before enabling the email option).

Let us know if you have any more questions.

Thanks

Hi Robbeck,

Do you have any script to get the faults generated from multiple domains?

I use this code for multiple domains:

Import-Module CiscoUcsPS

$a = Set-UcsPowerToolConfiguration -SupportMultipleDefaultUcs $true

$CredFileKey = ConvertTo-SecureString 'timetolockit' -AsPlainText -Force

$handleArray = connect-ucs -LiteralPath C:\scripts\creds\all.xml -key $credfilekey

$date = Get-Date -format "MM-dd-yyyy"

Get-UcsPSSession | select ucs, uri, version

$ab = @{Expression={$_.UCS};Label="UCS";width=13},

      @{Expression={$_.Severity};Label="Severity";width=8},

      @{Expression={$_.Ack};Label="Ack";width=4},

      @{Expression={$_.Created};Label="Created";width=23},

      @{Expression={$_.Code};Label="Code";width=5},

      @{Expression={$_.rule};Label="Rule";width=55},

      @{Expression={$_.Descr};Label="Descr";width=130},

      @{Expression={$_.DN};Label="DN";width=68}

Get-UcsFault -Ucs $handleArray | Sort-Object -Property Ucs,Severity -Descending | Select-Object Ucs,Severity,Ack,Created,code,rule,Descr,dn | format-table $ab -Wrap

Jim

Hi Guys not sure anyone still watching this, really love the script for multi domain but still having issues automating it as I run the script it attempts to open it via powershell and it fails as it needs the powertool to already be running, and here is my issue I can get the powertool to run using

%WINDIR%\System32\windowspowershell\v1.0\powershell.exe -NoExit -ExecutionPolicy RemoteSigned -c ". \"%PowerToolInstallPath%CiscoUcsPS\StartUcsPS.ps1""

But cannot get the script to run within this any help would be hugely appreciated

Chris

cmcina2211           christopher mcinally       :-  Chris  have you receive any reply ?  can we run the cisco power tool script from the windows scheduler ? 

Sorry no nothing as of yet

Rob gave an example using an -Silent switch; can you try that?

Chris,

If you are still having issues running this as a scheduled task please email me and we can review via WebEx.

Thanks

Brandon Beck

robbeck@cisco.com

Getting Started

Find answers to your questions by entering keywords or phrases in the Search bar above. New here? Use these resources to familiarize yourself with the community:

Cisco UCS X-Series Energy Efficiency Offer