< Back

Get-JenkinsViewList

Wed Jan 15, 2020 10:32 am

NAME Get-JenkinsViewList



SYNOPSIS

Get a list of views in a Jenkins master server.





SYNTAX

Get-JenkinsViewList [-Uri] <String> [[-Credential] <PSCredential>] [[-Crumb] <String>] [[-IncludeClass]

<String[]>] [[-ExcludeClass] <String[]>] [<CommonParameters>]





DESCRIPTION

Returns the list of views registered on a Jenkins Master server. The list of views returned can be filtered by

setting the IncludeClass or ExcludeClass parameters.





PARAMETERS

-Uri <String>

Contains the Uri to the Jenkins Master server to execute the command on.



Required? true

Position? 2

Default value None

Accept pipeline input? False

Accept wildcard characters? false



-Credential <PSCredential>

Contains the credentials to use to authenticate with the Jenkins Master server.



Required? false

Position? 3

Default value None

Accept pipeline input? False

Accept wildcard characters? false



-Crumb <String>

Contains a Crumb to pass to the Jenkins Master Server if CSRF is enabled.



Required? false

Position? 4

Default value None

Accept pipeline input? False

Accept wildcard characters? false



-IncludeClass <String[]>

This allows the class of objects that are returned to be limited to only these types.



Required? false

Position? 5

Default value None

Accept pipeline input? False

Accept wildcard characters? false



-ExcludeClass <String[]>

This allows the class of objects that are returned to exclude these types.



Required? false

Position? 6

Default value None

Accept pipeline input? False

Accept wildcard characters? false



<CommonParameters>

This cmdlet supports the common parameters: Verbose, Debug,

ErrorAction, ErrorVariable, WarningAction, WarningVariable,

OutBuffer, PipelineVariable, and OutVariable. For more information, see

about_CommonParameters (https:/go.microsoft.com/fwlink/?LinkID=113216).



INPUTS



OUTPUTS

An array of Jenkins View objects.







NOTES









-------------------------- EXAMPLE 1 --------------------------



PS C:\\>$Views = Get-JenkinsViewList `

-Uri 'https://jenkins.contoso.com' \\`

-Credential (Get-Credential) \\`

-Verbose



Returns the list of views on https://jenkins.contoso.com using the credentials provided by the user.

-------------------------- EXAMPLE 2 --------------------------



PS C:\\>$Views = Get-JenkinsViewList `

-Uri 'https://jenkins.contoso.com' \\`

-Credential (Get-Credential) \\`

-ExcludeClass 'hudson.model.AllView' \\`

-Verbose



Returns the list of views except for the AllView on https://jenkins.contoso.com using the credentials provided by

the user.



RELATED LINKS