Skip to content

Instantly share code, notes, and snippets.

What would you like to do?
Using custom model class for SPE ListView
Using a custom model class for SPE ListView reports can clean up the script and make it easier to control action button visibility.
class StagingProject {
$getProjectsArgs.OutputParameters.ProjectNames |
Show-ListView -Property @{Label="Name"; Expression={$_}}, @{Label="Status"; Expression={Get-StagingProjectStatus $_}}
$getProjectsArgs.OutputParameters.ProjectNames |
Foreach-Object {
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