This repository was archived by the owner on Nov 4, 2021. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 15
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* Added refresh command to Set-UnityLun function. * Added Get-UnityHostInitiator function. * Added refresh command to Set-UnityLun function. * Pulled latest changes from Equelin production repo. * Updated Set-UnitySnap documentation. * Re-updated Unity-PowerShell.UnityHostInitiator.Format.ps1xml file from source. * Added functions about hardware, updated docs * Fixed missing help parameters
- Loading branch information
Showing
158 changed files
with
4,322 additions
and
1,449 deletions.
There are no files selected for viewing
Binary file not shown.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
[CmdletBinding()] | ||
Param () | ||
|
||
$here = Split-Path -Parent $MyInvocation.MyCommand.Path | ||
|
||
. $here\Data.ps1 | ||
|
||
Foreach ($Class in ($Data.Class)) { | ||
Write-Verbose "Processing class $Class.TypeName" | ||
.\Convert-ClassToPS1xml.ps1 -TypeName $Class.TypeName -TableHeaderList $Class.TableHeaderList -OutputPath F:\Code\GitHub\Unity-Powershell\Unity-Powershell\Format\ | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
$Data = @{} | ||
|
||
$Data.Class = @( | ||
@{TypeName='UnityDae'; TableHeaderList=@('id','name','busId','slotNumber','model')} | ||
@{TypeName='UnityDisk'; TableHeaderList=@('id','name','Rawsize','DiskTechnology','Rpm','Bankslot')} | ||
@{TypeName='UnityDpe'; TableHeaderList=@('id','name','busId','slotNumber','model')} | ||
@{TypeName='UnityEncryption'; TableHeaderList=@('id','encryptionMode','encryptionStatus','encryptionPercentage','keyManagerBackupKeyStatus')} | ||
@{TypeName='UnityEthernetPort'; TableHeaderList=@('id','name','StorageProcessor','PortNumber','ConnectorType','Mtu','NeedsReplacement')} | ||
@{TypeName='UnitySsc'; TableHeaderList=@('id','name','parentDae','slotNumber','model')} | ||
@{TypeName='UnitySsd'; TableHeaderList=@('id','name','parent','slotNumber','model')} | ||
@{TypeName='UnityStorageProcessor'; TableHeaderList=@('id','name','parentDpe','slotNumber','model')} | ||
) | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,36 @@ | ||
$ProjectRoot = 'F:\Code\GitHub\Unity-Powershell' | ||
|
||
Import-Module "$ProjectRoot\Unity-Powershell" -Force | ||
|
||
#Build YAMLText starting with the header | ||
$YMLtext = (Get-Content "$ProjectRoot\header-mkdocs.yml") -join "`n" | ||
$YMLtext = "$YMLtext`n" | ||
|
||
$YMLText = "$YMLtext - Functions References:`n" | ||
# Drain the swamp | ||
$parameters = @{ | ||
Recurse = $true | ||
Force = $true | ||
Path = "$ProjectRoot\docs\References" | ||
ErrorAction = 'SilentlyContinue' | ||
} | ||
$null = Remove-Item @parameters | ||
$Params = @{ | ||
Path = "$ProjectRoot\docs\References" | ||
type = 'directory' | ||
ErrorAction = 'SilentlyContinue' | ||
} | ||
$null = New-Item @Params | ||
$Params = @{ | ||
Module = $ENV:BHProjectName | ||
Force = $true | ||
OutputFolder = "$ProjectRoot\docs\References" | ||
NoMetadata = $true | ||
} | ||
New-MarkdownHelp @Params | foreach-object { | ||
$Function = $_.Name -replace '\.md', '' | ||
$Part = " - {0}: References/{1}" -f $Function, $_.Name | ||
$YMLText = "{0}{1}`n" -f $YMLText, $Part | ||
$Part | ||
} | ||
$YMLtext | Set-Content -Path "$ProjectRoot\mkdocs.yml" |
This file was deleted.
Oops, something went wrong.
Binary file not shown.
Binary file modified
BIN
+0 Bytes
(100%)
Unity-Powershell/Format/Unity-Powershell.UnityDisk.Format.ps1xml
Binary file not shown.
Binary file not shown.
Binary file added
BIN
+6.6 KB
Unity-Powershell/Format/Unity-Powershell.UnityEncryption.Format.ps1xml
Binary file not shown.
Binary file modified
BIN
-574 Bytes
(96%)
Unity-Powershell/Format/Unity-Powershell.UnityEthernetPort.Format.ps1xml
Binary file not shown.
Binary file modified
BIN
-4.39 KB
(49%)
Unity-Powershell/Format/Unity-Powershell.UnityHostInitiator.Format.ps1xml
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file added
BIN
+11 KB
Unity-Powershell/Format/Unity-Powershell.UnityStorageProcessor.Format.ps1xml
Binary file not shown.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,52 @@ | ||
Function Get-UnityDae { | ||
|
||
<# | ||
.SYNOPSIS | ||
Information about Disk Array Enclosure (DAE) components in the storage system. | ||
.DESCRIPTION | ||
Information about Disk Array Enclosure (DAE) components in the storage system. | ||
You need to have an active session with the array. | ||
.NOTES | ||
Written by Erwan Quelin under MIT licence - https://github.com/equelin/Unity-Powershell/blob/master/LICENSE | ||
.LINK | ||
https://github.com/equelin/Unity-Powershell | ||
.PARAMETER Session | ||
Specifies an UnitySession Object. | ||
.PARAMETER Name | ||
Specifies the object name. | ||
.PARAMETER ID | ||
Specifies the object ID. | ||
.EXAMPLE | ||
Get-UnityDae | ||
Retrieve Information about Disk Array Enclosure (DAE) components in the storage system. | ||
#> | ||
|
||
[CmdletBinding(DefaultParameterSetName="ID")] | ||
Param ( | ||
[Parameter(Mandatory = $false,HelpMessage = 'EMC Unity Session')] | ||
$session = ($global:DefaultUnitySession | where-object {$_.IsConnected -eq $true}), | ||
[Parameter(Mandatory = $false,ParameterSetName="Name",ValueFromPipeline=$True,ValueFromPipelinebyPropertyName=$True,HelpMessage = 'DAE Name')] | ||
[String[]]$Name, | ||
[Parameter(Mandatory = $false,ParameterSetName="ID",ValueFromPipeline=$True,ValueFromPipelinebyPropertyName=$True,HelpMessage = 'DAE ID')] | ||
[String[]]$ID | ||
) | ||
|
||
Begin { | ||
Write-Debug -Message "[$($MyInvocation.MyCommand)] Executing function" | ||
|
||
#Initialazing variables | ||
$URI = '/api/types/dae/instances' #URI for the ressource (example: /api/types/lun/instances) | ||
$TypeName = 'UnityDae' | ||
} | ||
|
||
Process { | ||
Foreach ($sess in $session) { | ||
|
||
Write-Debug -Message "[$($MyInvocation.MyCommand)] Processing Session: $($Session.Server) with SessionId: $($Session.SessionId)" | ||
|
||
Get-UnityItemByKey -Session $Sess -URI $URI -Typename $Typename -Key $PsCmdlet.ParameterSetName -Value $PSBoundParameters[$PsCmdlet.ParameterSetName] | ||
|
||
} # End Foreach ($sess in $session) | ||
} # End Process | ||
} # End Function |
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,52 @@ | ||
Function Get-UnityDpe { | ||
|
||
<# | ||
.SYNOPSIS | ||
Information about Disk Processor Enclosures (DPEs) in the storage system. | ||
.DESCRIPTION | ||
Information about Disk Processor Enclosures (DPEs) in the storage system. | ||
You need to have an active session with the array. | ||
.NOTES | ||
Written by Erwan Quelin under MIT licence - https://github.com/equelin/Unity-Powershell/blob/master/LICENSE | ||
.LINK | ||
https://github.com/equelin/Unity-Powershell | ||
.PARAMETER Session | ||
Specifies an UnitySession Object. | ||
.PARAMETER Name | ||
Specifies the object name. | ||
.PARAMETER ID | ||
Specifies the object ID. | ||
.EXAMPLE | ||
Get-UnityDpe | ||
Retrieve Information about Disk Processor Enclosures (DPEs) in the storage system. | ||
#> | ||
|
||
[CmdletBinding(DefaultParameterSetName="ID")] | ||
Param ( | ||
[Parameter(Mandatory = $false,HelpMessage = 'EMC Unity Session')] | ||
$session = ($global:DefaultUnitySession | where-object {$_.IsConnected -eq $true}), | ||
[Parameter(Mandatory = $false,ParameterSetName="Name",ValueFromPipeline=$True,ValueFromPipelinebyPropertyName=$True,HelpMessage = 'DPE Name')] | ||
[String[]]$Name, | ||
[Parameter(Mandatory = $false,ParameterSetName="ID",ValueFromPipeline=$True,ValueFromPipelinebyPropertyName=$True,HelpMessage = 'DPE ID')] | ||
[String[]]$ID | ||
) | ||
|
||
Begin { | ||
Write-Debug -Message "[$($MyInvocation.MyCommand)] Executing function" | ||
|
||
#Initialazing variables | ||
$URI = '/api/types/dpe/instances' #URI for the ressource (example: /api/types/lun/instances) | ||
$TypeName = 'UnityDpe' | ||
} | ||
|
||
Process { | ||
Foreach ($sess in $session) { | ||
|
||
Write-Debug -Message "[$($MyInvocation.MyCommand)] Processing Session: $($Session.Server) with SessionId: $($Session.SessionId)" | ||
|
||
Get-UnityItemByKey -Session $Sess -URI $URI -Typename $Typename -Key $PsCmdlet.ParameterSetName -Value $PSBoundParameters[$PsCmdlet.ParameterSetName] | ||
|
||
} # End Foreach ($sess in $session) | ||
} # End Process | ||
} # End Function |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,50 @@ | ||
Function Get-UnityEncryption { | ||
|
||
<# | ||
.SYNOPSIS | ||
Information about Encryption. | ||
.DESCRIPTION | ||
Information about Encryption. | ||
You need to have an active session with the array. | ||
.NOTES | ||
Written by Erwan Quelin under MIT licence - https://github.com/equelin/Unity-Powershell/blob/master/LICENSE | ||
.LINK | ||
https://github.com/equelin/Unity-Powershell | ||
.PARAMETER Session | ||
Specifies an UnitySession Object. | ||
.PARAMETER ID | ||
Specifies the object ID. | ||
.EXAMPLE | ||
Get-UnityEncryption | ||
Retrieve Information about Encryption. | ||
#> | ||
|
||
[CmdletBinding(DefaultParameterSetName="ID")] | ||
Param ( | ||
[Parameter(Mandatory = $false,HelpMessage = 'EMC Unity Session')] | ||
$session = ($global:DefaultUnitySession | where-object {$_.IsConnected -eq $true}), | ||
[Parameter(Mandatory = $false,ParameterSetName="ID",ValueFromPipeline=$True,ValueFromPipelinebyPropertyName=$True,HelpMessage = 'Encryption ID')] | ||
[String[]]$ID | ||
) | ||
|
||
Begin { | ||
Write-Debug -Message "[$($MyInvocation.MyCommand)] Executing function" | ||
|
||
#Initialazing variables | ||
$URI = '/api/types/encryption/instances' #URI for the ressource (example: /api/types/lun/instances) | ||
$TypeName = 'UnityEncryption | ||
' | ||
} | ||
|
||
Process { | ||
Foreach ($sess in $session) { | ||
|
||
Write-Debug -Message "[$($MyInvocation.MyCommand)] Processing Session: $($Session.Server) with SessionId: $($Session.SessionId)" | ||
|
||
Get-UnityItemByKey -Session $Sess -URI $URI -Typename $Typename -Key $PsCmdlet.ParameterSetName -Value $PSBoundParameters[$PsCmdlet.ParameterSetName] | ||
|
||
} # End Foreach ($sess in $session) | ||
} # End Process | ||
} # End Function |
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,53 @@ | ||
Function Get-UnitySsc { | ||
|
||
<# | ||
.SYNOPSIS | ||
Information about System Status Cards (SSCs) in the storage system. | ||
.DESCRIPTION | ||
Information about System Status Cards (SSCs) in the storage system. | ||
Applies to physical deployments only. | ||
You need to have an active session with the array. | ||
.NOTES | ||
Written by Erwan Quelin under MIT licence - https://github.com/equelin/Unity-Powershell/blob/master/LICENSE | ||
.LINK | ||
https://github.com/equelin/Unity-Powershell | ||
.PARAMETER Session | ||
Specifies an UnitySession Object. | ||
.PARAMETER ID | ||
Specifies the object ID. | ||
.PARAMETER Name | ||
Specifies the object name. | ||
.EXAMPLE | ||
Get-UnitySsc | ||
Retrieve Information about System Status Cards (SSCs) in the storage system. | ||
#> | ||
|
||
[CmdletBinding(DefaultParameterSetName="ID")] | ||
Param ( | ||
[Parameter(Mandatory = $false,HelpMessage = 'EMC Unity Session')] | ||
$session = ($global:DefaultUnitySession | where-object {$_.IsConnected -eq $true}), | ||
[Parameter(Mandatory = $false,ParameterSetName="Name",ValueFromPipeline=$True,ValueFromPipelinebyPropertyName=$True,HelpMessage = 'SSD Name')] | ||
[String[]]$Name, | ||
[Parameter(Mandatory = $false,ParameterSetName="ID",ValueFromPipeline=$True,ValueFromPipelinebyPropertyName=$True,HelpMessage = 'SSD ID')] | ||
[String[]]$ID | ||
) | ||
|
||
Begin { | ||
Write-Debug -Message "[$($MyInvocation.MyCommand)] Executing function" | ||
|
||
#Initialazing variables | ||
$URI = '/api/types/ssc/instances' #URI for the ressource (example: /api/types/lun/instances) | ||
$TypeName = 'UnitySsc' | ||
} | ||
|
||
Process { | ||
Foreach ($sess in $session) { | ||
|
||
Write-Debug -Message "[$($MyInvocation.MyCommand)] Processing Session: $($Session.Server) with SessionId: $($Session.SessionId)" | ||
|
||
Get-UnityItemByKey -Session $Sess -URI $URI -Typename $Typename -Key $PsCmdlet.ParameterSetName -Value $PSBoundParameters[$PsCmdlet.ParameterSetName] | ||
|
||
} # End Foreach ($sess in $session) | ||
} # End Process | ||
} # End Function |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,53 @@ | ||
Function Get-UnitySsd { | ||
|
||
<# | ||
.SYNOPSIS | ||
Information about internal Flash-based Solid State Disks (SSDs, mSATAs) in the storage system. | ||
.DESCRIPTION | ||
Information about internal Flash-based Solid State Disks (SSDs, mSATAs) in the storage system. | ||
Applies to physical deployments only. | ||
You need to have an active session with the array. | ||
.NOTES | ||
Written by Erwan Quelin under MIT licence - https://github.com/equelin/Unity-Powershell/blob/master/LICENSE | ||
.LINK | ||
https://github.com/equelin/Unity-Powershell | ||
.PARAMETER Session | ||
Specifies an UnitySession Object. | ||
.PARAMETER ID | ||
Specifies the object ID. | ||
.PARAMETER Name | ||
Specifies the object name. | ||
.EXAMPLE | ||
Get-UnitySsd | ||
Retrieve Information about SSD. | ||
#> | ||
|
||
[CmdletBinding(DefaultParameterSetName="ID")] | ||
Param ( | ||
[Parameter(Mandatory = $false,HelpMessage = 'EMC Unity Session')] | ||
$session = ($global:DefaultUnitySession | where-object {$_.IsConnected -eq $true}), | ||
[Parameter(Mandatory = $false,ParameterSetName="Name",ValueFromPipeline=$True,ValueFromPipelinebyPropertyName=$True,HelpMessage = 'SSD Name')] | ||
[String[]]$Name, | ||
[Parameter(Mandatory = $false,ParameterSetName="ID",ValueFromPipeline=$True,ValueFromPipelinebyPropertyName=$True,HelpMessage = 'SSD ID')] | ||
[String[]]$ID | ||
) | ||
|
||
Begin { | ||
Write-Debug -Message "[$($MyInvocation.MyCommand)] Executing function" | ||
|
||
#Initialazing variables | ||
$URI = '/api/types/ssd/instances' #URI for the ressource (example: /api/types/lun/instances) | ||
$TypeName = 'UnitySsd' | ||
} | ||
|
||
Process { | ||
Foreach ($sess in $session) { | ||
|
||
Write-Debug -Message "[$($MyInvocation.MyCommand)] Processing Session: $($Session.Server) with SessionId: $($Session.SessionId)" | ||
|
||
Get-UnityItemByKey -Session $Sess -URI $URI -Typename $Typename -Key $PsCmdlet.ParameterSetName -Value $PSBoundParameters[$PsCmdlet.ParameterSetName] | ||
|
||
} # End Foreach ($sess in $session) | ||
} # End Process | ||
} # End Function |
Oops, something went wrong.