Last active
August 12, 2019 04:41
-
-
Save BenGGolden/03071b2610aae5d5264fd7ff717be093 to your computer and use it in GitHub Desktop.
Using custom model class for SPE ListView
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
Using a custom model class for SPE ListView reports can clean up the script and make it easier to control action button visibility. |
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
class StagingProject { | |
[string]$Name | |
[string]$Status | |
} |
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
$getProjectsArgs.OutputParameters.ProjectNames | | |
Show-ListView -Property @{Label="Name"; Expression={$_}}, @{Label="Status"; Expression={Get-StagingProjectStatus $_}} |
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
$getProjectsArgs.OutputParameters.ProjectNames | | |
Foreach-Object { | |
[StagingProject]@{ | |
Name = $_ | |
Status = (Get-StagingProjectStatus $_) | |
} | |
} | | |
Show-ListView -Property Name, Status |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment