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

Badges
MCSE
Community

Cozumpark Bilisim Portali
Posted in Windows Powershell, Windows Server | No Comment | 38,089 views | 27/06/2014 09:55

Following scripts require EMC Storage Integrator (ESI) PowerShell Toolkit (ESIPSToolkit).

Getting EMC Storage Snapshot Pools:

1
2
3
4
5
6
7
8
9
10
11
12
13
14
Import-Module ESIPSToolkit
function Get-EMCStorageSnapPools {
	$Storages = Get-EMCStorageSystem
	foreach ($Storage in $Storages) {
		$GlobalID = $Storage.GlobalID
		$Snappool = Get-EMCSnapshotPool | Where StorageSystemGlobalId -eq $GlobalID
		$Properties = New-Object Psobject
		$Properties | Add-Member Noteproperty StorageName $Storage.UserFriendlyName
		$Properties | Add-Member Noteproperty AvailableCapacity $Snappool.AvailableCapacity
		$Properties | Add-Member Noteproperty UserCapacity $Snappool.UserCapacity
		Write-Output $Properties
	}
}
Get-EMCStorageSnapPools

Getting Storage List:

1
2
3
Import-Module ESIPSToolkit
$Storage = Get-EMCStorageSystem
$Storage.UserFriendlyName

Getting Storage Thin Pools:

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
Import-Module ESIPSToolkit
function Get-EMCStorageThinPools {
	$Storages = Get-EMCStorageSystem
	foreach ($Storage in $Storages) {
		$GlobalID = $Storage.GlobalID
		$Thinpool = Get-EMCStoragePool | Where SupportsThinProvisioning -eq "True" | where StorageSystemGlobalId -eq $GlobalID
 
		foreach ($Pool in $Thinpool) {
			$Properties = New-Object Psobject
			$Properties | Add-Member Noteproperty StorageName $storage.UserFriendlyName
			$Properties | Add-Member Noteproperty PoolName $pool.Name
			$Properties | Add-Member Noteproperty TotalCapacity $pool.TotalCapacity.ValueGB
			$Properties | Add-Member Noteproperty AvailableCapacity $pool.AvailableCapacity.ValueGB
			$Properties | Add-Member Noteproperty SubscribedCapacity $pool.SubscribedCapacity.ValueGB
			Write-Output $Properties
		}
	}
}
Get-EMCStorageThinPools

Registering Host:

1
2
3
$StorageArray = Get-EMCStorageSystem "CX4_1"
$HostRegistration = "C0:03:FF:00:00:FF:FF:00:C0:03:FF:65:4D:A6:00:00","C0:03:FF:00:00:FF:FF:00:C0:03:FF:37:25:4E:00:16"
$RegisterHost = New-EMCStorageRegisteredHost -StorageSystem $StorageArray -HostName "Server01" -IpAddress "192.168.0.114" -HostBusAdapterIds $HostRegistration

To be continued.. :)