VMware: Status of VMs
This article describes how to download a specific dashboard pack. You can download dashboard packs from dashboards.squaredup.com and learn more about how dashboard packs work here: Dashboard Packs.
Description
This dashboard is a proof of concept on how to use VMware's PowerShell PowerCLI to quickly create dashboards.
How do I import and configure this dashboard?
Ensure you're using SquaredUp DS v5.4 or above.
Already a SquaredUp customer?
Get the latest version of SquaredUp DS for SCOM
New to SquaredUp?
- Install VMware's PowerCLI on the server hosting SquaredUp DS for SCOM see VMware: PowerCLI Installation Guide
- Create a PowerShell profile in SquaredUp DS with the following settings:
############################################################################### # Load up our Custom Profile ############################################################################### $User = "RunAs Account UserName" $Pass = "RunAs Account Password" #The URL to our vCenter Server $vCenter = "FQDN of your vCenter Server" ############################################################################### # Before a connection to vCenter is initiated, check some specific settings # We mostly care about ignoring invalid certificate warnings and depreciated warnings # Wrap the settings change in a Try-Catch block to prevent any unhandled exception messages # This prevents error messages when multiple tiles attempt (and fail) to write to the PowerCLI_Settings.xml file at the same time ############################################################################### $lConfig = Get-PowerCLIConfiguration -Scope User If ($lConfig.InvalidCertificateAction -ne 'Ignore') { try { Set-PowerCLIConfiguration -InvalidCertificateAction Ignore -Confirm:$false -ErrorAction SilentlyContinue } Catch { #$Error[0] } } If ($lConfig.DisplayDeprecationWarnings -ne 'False') { try { Set-PowerCLIConfiguration -DisplayDeprecationWarnings $false -Confirm:$false -ErrorAction SilentlyContinue | Out-Null } Catch { #Error[0] } } ############################################################################### # Conenct to vCenter ############################################################################### $serverlist = $global:DefaultVIServer while ($serverlist.IsConnected -ne "True") { try{ Connect-VIServer -Server $vCenter -User $User -Password $Pass -ErrorAction SilentlyContinue } catch { } $serverlist = $global:DefaultVIServer } ############################################################################### # Page Timeframe code ############################################################################### $finish = [DateTime]::Now switch ($timeFrame) { "last1Hour" { $start = $finish.Addhours(-1); $MaxSamples = 150; } "last12Hours" { $start = $finish.Addhours(-12); $MaxSamples = 300; } "last24Hours" { $start = $finish.Addhours(-24); $MaxSamples = 400; } "last7Days" { $start = $finish.AddDays(-7); $MaxSamples = 500; } "last30Days" { $start = $finish.AddDays(-30); $MaxSamples = 600; } "last3Months" { $start = $finish.AddMonths(-3); $MaxSamples = 700; } "last6Months" { $start = $finish.AddMonths(-6); $MaxSamples = 800; } "last12Months" { $start = $finish.AddMonths(-12); $MaxSamples = 900; } } ############################################################################### # Some variables to resuse ############################################################################### $vm = "Insert the Name of a VM here" $vmHost = Get-VMHost -Name "FQDN of your vCenter Host"
- From the top right hand menu ☰ click system.
- Go to the PowerShell tab.
- Click add new profile.
- Enter a name and a description for the new profile.
- Enter the profile script.
- Click add profile.
The profile is now saved and can be used in a PowerShell tile.
- Create a Run As account in SquaredUp DS with the following settings:
- From the top right hand menu ☰ click system.
- Go to the PowerShell tab.
- In the Run As section, click on the + button to add a new Run As.
- Enter a name and a description for your new Run As.
Note: Once you have saved the Run As account, you can't change its name anymore. You can always change the description. - Enter the user credentials you want to use for this Run As account.
Do not use your own or anyone's personal user account for Run As accounts. Instead, create a new account that is not used by a specific person (a "service account"), but only used for running PowerShell scripts. Consider the permissions of this service account carefully.
Required permissions for service accounts:
The service account you use for Run As must have at least the following permission:
- Allow log on locally
If you don't use the default NetworkService as your application pool identity, you might see the following error message when using Run As accounts: A required privilege is not held by the client.
In this case you need to add the application pool identity to the following policies:
- Adjust memory quotas for a process
- Replace a process-level token (you need to reboot the server for this policy to take effect)
The user credentials you enter for the Run As account are used to run all PowerShell scripts in tiles that use the Run As account. Once created, your Run As account can be used by other SquaredUp DS administrators to run their scripts. By using your or any user's credentials, you lose control over which scripts are executed in the name of this user which can cause privacy issues. In addition to that, users often have more rights than a script would need. By using a user account with extensive permissions, scripts that use the Run As can exploit those permissions.
- Click save to save the new Run As account.
The Run As account is now available in PowerShell tiles and can be used to execute scripts.
Download and import this dashboard pack.
- Download the dashboard pack zip file for the dashboard pack you wish to import.
There may be additional steps before or after the import to get the dashboard working in your environment.
- In DS for SCOM go to the top right hand menu ☰ > Import Dashboard Packs and drag the zip file into the Manual Import box.
- The dashboard pack is imported and if the pack contains top-level dashboards, these will automatically appear in the navigation bar, usually in a folder called 'Community Dashboards' for dashboard packs from the SquaredUp Community. If the dashboard pack also contains perspectives (see Working with perspectives), then you'll see these when you drilldown to the relevant object.
- Carry out any additional steps required to make the dashboard work in your environment. These steps will be described on the download page for each dashboard. For example, you may need to create the correctly named Web API provider, create a PowerShell profile, or edit tile collections.
- Edit the imported dashboard as required.
- Download the dashboard pack zip file for the dashboard pack you wish to import.
Publish the dashboard.
A newly created dashboard will not be visible to others until it is published.
Only admins can publish dashboards, unless you have been given author permissions to a Team Folder see Team Folders
If you made changes to an existing dashboard, the changes will only be visible to others after you published the dashboard again.
You can identify a dashboard that has not been published yet or has unpublished changes by the unpublished button at the top:
When you click on the unpublished button, you'll have two options:
- Publish will make the dashboard or changes visible to others.
Note: A newly created dashboard will appear on the menu where you created it. To move the dashboard to a different place on the navigation bar see How to edit the Navigation Bar. - Discard will delete your draft dashboard if it has never been published or, if you made changes to an already published dashboard, discard the changes.
Publishing dashboards to different audiences
Find out how to publish dashboards to a subset of users using Team Folders or visible to anyone even unlicensed users with Open Access (Sharing Dashboards with anyone - Open Access).
- Publish will make the dashboard or changes visible to others.