Skip to content

Commit 0a61bfb

Browse files
author
barkz
authored
Merge pull request #80 from PureStorage-OpenConnect/dev/aguzev/tab_order
Fix Excel tab order
2 parents 9231237 + 446063a commit 0a61bfb

File tree

3 files changed

+17
-17
lines changed

3 files changed

+17
-17
lines changed

PureStoragePowerShellToolkit.DatabaseTools/PureStoragePowerShellToolkit.DatabaseTools.psd1

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -75,7 +75,7 @@ RequiredModules = @(
7575
},
7676
@{
7777
ModuleName = 'dbatools'
78-
ModuleVersion = '1.1.146'
78+
ModuleVersion = '1.0.173'
7979
}
8080
)
8181

PureStoragePowerShellToolkit.FlashArray/PureStoragePowerShellToolkit.FlashArray.psm1

Lines changed: 12 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -489,7 +489,7 @@ function Export-Pfa2Excel {
489489
[CmdletBinding()]
490490
param(
491491
[Parameter(ValueFromPipeline)]
492-
[hashtable]$Tables,
492+
[System.Collections.IDictionary]$Tables,
493493
[Parameter(Mandatory)]
494494
[string]$LiteralPath
495495
)
@@ -568,9 +568,9 @@ function Export-Pfa2Excel {
568568
}
569569

570570
$items = @(foreach($valueItem in $valueArray) {
571-
$ht = @{}
571+
$ht = [ordered]@{}
572572

573-
$( if ($valueItem -is [hashtable]) { $valueItem.GetEnumerator() } else { $valueItem.PSObject.Properties } ) |
573+
$( if ($valueItem -is [System.Collections.IDictionary]) { $valueItem.GetEnumerator() } else { $valueItem.PSObject.Properties } ) |
574574
ForEach-Object {
575575
$value = if(($null -eq $_.Value) -or $dataTypes.ContainsKey($_.Value.GetType())) { $_.Value } else {[string]$_.Value}
576576
$ht.Add($_.Name, $value )
@@ -3201,10 +3201,10 @@ function New-Pfa2ExcelReport {
32013201
$excelFile = Join-Path $OutPath "$($array_details.name)-$date.xlsx"
32023202
Write-Host 'Writing data to Excel workbook...' -ForegroundColor green
32033203

3204-
$report = @{}
3204+
$report = [ordered]@{}
32053205

32063206
# Array Information
3207-
$report['Array_Info'] = @( @{
3207+
$report['Array_Info'] = @( [ordered]@{
32083208
'Array Name' = ($array_details.Name).ToUpper()
32093209
'Array ID' = $array_details.Id
32103210
'Purity Version' = $array_details.Version
@@ -3224,7 +3224,7 @@ function New-Pfa2ExcelReport {
32243224

32253225
## Volume Details
32263226
$details = $volumes | ForEach-Object {
3227-
@{
3227+
[ordered]@{
32283228
'Name' = $_.Name
32293229
'Size(GB)' = Convert-UnitOfSize $_.provisioned -To 1GB
32303230
'Unique Data(GB)' = Convert-UnitOfSize $_.space.Unique -To 1GB
@@ -3269,7 +3269,7 @@ function New-Pfa2ExcelReport {
32693269
## Volume Snapshot details
32703270
if ($snapshots) {
32713271
$report['Volume Snapshots'] = $snapshots | ForEach-Object {
3272-
@{
3272+
[ordered]@{
32733273
'Name' = $_.Name
32743274
'Created' = $_.Created
32753275
'Provisioned(GB)' = Convert-UnitOfSize $_.Provisioned -To 1GB
@@ -3286,7 +3286,7 @@ function New-Pfa2ExcelReport {
32863286
# Host Details
32873287
if ($host_details) {
32883288
$report['Hosts'] = $host_details | ForEach-Object {
3289-
@{
3289+
[ordered]@{
32903290
'Name' = $_.Name
32913291
'No. of Volumes' = $_.ConnectionCount
32923292
'HostGroup' = $_.HostGroup.Name
@@ -3302,7 +3302,7 @@ function New-Pfa2ExcelReport {
33023302
## HostGroup Details
33033303
if ($hostgroup) {
33043304
$report['Host Groups'] = $hostgroup | ForEach-Object {
3305-
@{
3305+
[ordered]@{
33063306
'Name' = $_.Name
33073307
'HostCount' = $_.HostCount
33083308
'No. of Volumes' = $_.ConnectionCount
@@ -3316,7 +3316,7 @@ function New-Pfa2ExcelReport {
33163316
## Protection Group and Protection Group Transfer details
33173317
if ($pgd) {
33183318
$report['Protection Groups'] = $pgd | ForEach-Object {
3319-
@{
3319+
[ordered]@{
33203320
'Name' = $_.Name
33213321
'Snapshot Size(GB)' = Convert-UnitOfSize $_.space.snapshots -To 1GB
33223322
'VolumeCount' = $_.VolumeCount
@@ -3329,7 +3329,7 @@ function New-Pfa2ExcelReport {
33293329

33303330
if ($pgst) {
33313331
$report['PG Snapshot Transfers'] = $pgst | ForEach-Object {
3332-
@{
3332+
[ordered]@{
33333333
'Name' = $_.Name
33343334
'Data Transferred(MB)' = Convert-UnitOfSize $_.DataTransferred -To 1MB
33353335
'Destroyed' = $_.Destroyed
@@ -3344,7 +3344,7 @@ function New-Pfa2ExcelReport {
33443344
## Pod details
33453345
if ($pods) {
33463346
$report['Pods'] = $pods | ForEach-Object {
3347-
@{
3347+
[ordered]@{
33483348
'Name' = $_.Name
33493349
'ArrayCount' = $_.ArrayCount
33503350
'Source' = $_.source.name

PureStoragePowerShellToolkit.WindowsAdministration/PureStoragePowerShellToolkit.WindowsAdministration.psm1

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -761,15 +761,15 @@ function New-Pfa2HypervClusterVolumeReport() {
761761
}
762762
}
763763

764-
$report = @{}
764+
$report = [ordered]@{}
765765

766766
#Get VMs & VHDs
767767
$nodes = Get-ClusterNode
768768
$vhds = Get-VM -ComputerName $nodes.Name |
769769
ForEach-Object { $_ } -PipelineVariable 'vm' |
770770
ForEach-Object { Get-Vhd -ComputerName $_.ComputerName -VmId $_.VmId } |
771771
ForEach-Object {
772-
[pscustomobject]@{
772+
[pscustomobject][ordered]@{
773773
'VM Name' = $vm.Name
774774
'VM State' = $vm.State
775775
'ComputerName' = $_.ComputerName
@@ -796,7 +796,7 @@ function New-Pfa2HypervClusterVolumeReport() {
796796
} |
797797
Where-Object DriveType -eq Fixed |
798798
ForEach-Object {
799-
[pscustomobject]@{
799+
[pscustomobject][ordered]@{
800800
'ComputerName' = $node.Name
801801
'Label' = $_.FileSystemLabel
802802
'Name' = if ($_.DriveLetter) { "$($_.DriveLetter):\" } else { $_.Path }
@@ -844,7 +844,7 @@ function New-Pfa2HypervClusterVolumeReport() {
844844
Where-Object { $sn -contains $_.serial } |
845845
Select-Object 'Name' -ExpandProperty 'Space' |
846846
ForEach-Object {
847-
[pscustomobject]@{
847+
[pscustomobject][ordered]@{
848848
'Array' = $details.Name
849849
'Name' = $_.Name
850850
'Size (GB)' = Convert-UnitOfSize $_.TotalProvisioned -To 1GB

0 commit comments

Comments
 (0)