07-13-2013 04:23 PM
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
11-06-2013 04:54 PM
Great Script...
02-19-2014 04:47 AM
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.
04-23-2014 11:05 AM
Can you share the script with me i would like to test it for multiple Domains.
05-11-2014 10:33 PM
I actually just posted this as part of the UCS scripting competition. Feel free to reach out to me if you have any questions.
Thanks
05-15-2014 06:36 AM
Hi Robbeck,
Can you help me to automate this health check report to run on daily for all UCS domains.
05-15-2014 06:43 AM
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
05-15-2014 07:28 AM
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
05-18-2014 09:40 PM
Hi Robbeck,
Do you have any script to get the faults generated from multiple domains?
07-11-2014 12:08 PM
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
11-11-2014 06:46 AM
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
04-15-2015 06:52 AM
cmcina2211 christopher mcinally :- Chris have you receive any reply ? can we run the cisco power tool script from the windows scheduler ?
04-15-2015 07:12 AM
Sorry no nothing as of yet
10-27-2015 07:07 AM
Rob gave an example using an -Silent switch; can you try that?
10-26-2015 05:05 AM
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
Discover and save your favorite ideas. Come back to expert answers, step-by-step guides, recent topics, and more.
New here? Get started with these tips. How to use Community New member guide