Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- Import-Module $SuperOpsModule
- $customerSubDomain = "surepointit"
- $apiKey = "api-eyJhbGciOiJSUzI1NiJ9.eyJqdGkiOiI2ODg0MzEyMzQzMTM3MTgxNjk2IiwicmFuZG9taXplciI6Iu-_ve-_ve-_vSzvv71A77-9XHUwMDE2UiJ9.NH7qEnz02CrhNh5vJUSo8XNGeJevl3i5STcxpqTiY7iAdb29_aTFKFkC08zFNgDm9YXX_srR3cZatf6p1v8iMlAK9pM4BAYwv1GxmuEdHg63RZoLbPQCbl-ROSVC2VEcxKWz3etdfsTufLNNDw3_666jCPsA0ZeUrQRskP7_6KkS5XIt2w2JTdSf4Nylc-aq5pmaT0sxWVI0ENEWixRNqMCdnPaLa4IyH3gvXJmvZXxSiPiJw1_Kl1HsodAqJkZr-kvmBQqz4dfheI9TmY7p95GvdP9lBLgrKDNHAJkdYb9OuWIHIeeLWUnZtwfZEW9Fty65XIHLKuE-fOc6LssXLg"
- # Check to see if this server is a physical host
- if ((Get-WmiObject -Namespace "root\cimv2" -Class Win32_ComputerSystem).Model -like '*Virtual*') {
- Write-Host "Unsupported Server. This can only run on a physical host."
- exit 0
- }
- # Check to see if this server is a Dell.
- if ((Get-CimInstance -ClassName Win32_ComputerSystem).Manufacturer -notlike 'Dell*') {
- Write-Host "System Manufacturer is not Dell, exiting..."
- exit 0
- }
- # Check to see if this server is a PowerEdge.
- if ((Get-CimInstance -ClassName Win32_ComputerSystem).Model -notlike 'PowerEdge*') {
- Write-Host "System Manufacturer is not a PowerEdge, exiting..."
- exit 0
- }
- $version = (Get-ItemProperty "HKLM:\SOFTWARE\Microsoft\Windows NT\CurrentVersion").CurrentVersion
- if ($Version -lt "6.3") {
- Write-Host "Unsupported OS. This component requires at least Server 2012R2"
- exit 0
- }
- try {
- omconfig preferences cdvformat delimiter=comma
- $OmReport = omreport storage vdisk -fmt cdv | select-string -SimpleMatch "ID,Status," -Context 0, 5000
- }
- catch {
- throw "Error: omreport Command has Failed: $($_.Exception.Message). Check if Dell OpenManage is installed and OMReport is in the PATH variable."
- }
- $VDarray = convertfrom-csv $OmReport -Delimiter ","
- foreach ($VirtualDisk in $VDarray | where-object { $_.'> ID' -in 0..1000 }) {
- if ($($virtualdisk.State) -eq "Ready" -or $($virtualdisk.Status) -eq "Ok") {
- }
- else {
- write-host "$($VirtualDisk.Name) / $($VirtualDisk.'Device Name') Has Status $($VirtualDisk.Status) / $($VirtualDisk.State)"
- $RAIDStatus = "failed"
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement