< Back
Test-JenkinsFolder
Post
NAME Test-JenkinsFolder
SYNOPSIS
Determines if a Jenkins Folder exists.
SYNTAX
Test-JenkinsFolder [-Uri] <String> [[-Credential] <PSCredential>] [[-Crumb] <String>] [[-Folder] <String>]
[[-Name] <String>] [<CommonParameters>]
DESCRIPTION
Returns true if a Folder exists in the specified Jenkins Master server with a matching Name. This requires the
Jobs Plugin to be installed on Jenkins. It will search inside a specific folder if one is passed.
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
-Folder <String>
The optional folder to look for the folder in.
Required? false
Position? 5
Default value None
Accept pipeline input? False
Accept wildcard characters? false
-Name <String>
The name of the folder to check for.
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
A boolean indicating if the was found or not.
NOTES
-------------------------- EXAMPLE 1 --------------------------
PS C:\\>Test-JenkinsFolder `
-Uri 'https://jenkins.contoso.com' \\`
-Credential (Get-Credential) \\`
-Name 'My Builds' \\`
-Verbose
Returns true if the 'My Builds' folder is found on https://jenkins.contoso.com using the credentials provided by
the user.
-------------------------- EXAMPLE 2 --------------------------
PS C:\\>Test-JenkinsFolder `
-Uri 'https://jenkins.contoso.com' \\`
-Credential (Get-Credential) \\`
-Folder 'Misc' \\`
-Name 'My Builds' \\`
-Verbose
Returns true if the 'My Builds' folder is found in the 'Misc' folder on https://jenkins.contoso.com using the
credentials provided by the user.
RELATED LINKS
SYNOPSIS
Determines if a Jenkins Folder exists.
SYNTAX
Test-JenkinsFolder [-Uri] <String> [[-Credential] <PSCredential>] [[-Crumb] <String>] [[-Folder] <String>]
[[-Name] <String>] [<CommonParameters>]
DESCRIPTION
Returns true if a Folder exists in the specified Jenkins Master server with a matching Name. This requires the
Jobs Plugin to be installed on Jenkins. It will search inside a specific folder if one is passed.
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
-Folder <String>
The optional folder to look for the folder in.
Required? false
Position? 5
Default value None
Accept pipeline input? False
Accept wildcard characters? false
-Name <String>
The name of the folder to check for.
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
A boolean indicating if the was found or not.
NOTES
-------------------------- EXAMPLE 1 --------------------------
PS C:\\>Test-JenkinsFolder `
-Uri 'https://jenkins.contoso.com' \\`
-Credential (Get-Credential) \\`
-Name 'My Builds' \\`
-Verbose
Returns true if the 'My Builds' folder is found on https://jenkins.contoso.com using the credentials provided by
the user.
-------------------------- EXAMPLE 2 --------------------------
PS C:\\>Test-JenkinsFolder `
-Uri 'https://jenkins.contoso.com' \\`
-Credential (Get-Credential) \\`
-Folder 'Misc' \\`
-Name 'My Builds' \\`
-Verbose
Returns true if the 'My Builds' folder is found in the 'Misc' folder on https://jenkins.contoso.com using the
credentials provided by the user.
RELATED LINKS