search
Categories
Sponsors
VirtualMetric Hyper-V Monitoring, Hyper-V Reporting
Archive
Blogroll

Badges
MCSE
Community

Cozumpark Bilisim Portali
Get Disk Indexes for System Center Orchestrator Disk Operations
Posted in Windows Powershell, Windows Server | No Comment | 1,190 views | 07/01/2014 15:03

You can use this example to get disk indexes to use it in other orchestrator tasks like Disk Format.

1
2
3
4
5
6
7
8
9
10
11
$VMName = $PoSHQuery.VMName
$Snapshot = Get-WmiObject Win32_DiskDrive -ComputerName $VMName
$DiskIndex = "index"
foreach ($DiskItems in $Snapshot)
{
	$Index = $DiskItems.Index
	$DiskIndex += ";$Index"
}
@"
$($DiskIndex)
"@

Result gives you current disk indexes in remote server.



Leave a Reply