On this page

Add-ServerConfiguration

SYNOPSIS

Stores a new Server entry for the module to known with what server it should talk to.

SYNTAX

Add-AtlassianServerConfiguration [-Uri] <Uri> [[-Name] <String>]
 [-Type] <ServerType> [[-Session] <WebRequestSession>] [[-Headers] <Hashtable>]
 [<CommonParameters>]

DESCRIPTION

This function allows for several Server object to be stored in memory. Stored servers are used by the commands in order to know with what server to communicate.

The stored servers can be exported to file with Export-Configuration.
Exported servers will be imported automatically when the module is loaded.

EXAMPLES

EXAMPLE 1

Add-AtlassianServerConfiguration -Uri "https://server.com/" -Name "Server Prod" -Type "Jira"

This command will store the Jira server address and name in memory and allow other commands to identify the server by the name “Server Prod”

EXAMPLE 2

Add-AtlassianServerConfiguration -Uri "https://server.com/" -Type "Jira"

This command will store the Jira server address with the name “server.com” in memory and allow other commands to identify the server by the name “Server Prod”

PARAMETERS

-Uri

Address of the Server.

Type: Uri
Parameter Sets: (All)
Aliases: Url, Address

Required: True
Position: 1
Default value: None
Accept pipeline input: True (ByPropertyName, ByValue)
Accept wildcard characters: False

-Name

Name with which this server will be stored.

If no name is provided, the “Authority” of the address will be used. This value must be unique.

In case the ServerName was already saved, it will be overwritten.

Example for “Authority”: https://**www.google.com**/maps?hl=en –> www.google.com

Is not case sensitive

Type: String
Parameter Sets: (All)
Aliases: ServerName, Alias

Required: False
Position: 2
Default value: $Uri.Authority
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

-Type

Type of the server to store.

This can be:

  • Bitbucket
  • Confluence
  • Jira
Type: ServerType
Parameter Sets: (All)
Aliases:
Accepted values: BITBUCKET, CONFLUENCE, JIRA

Required: True
Position: 3
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

-Session

Stores a WebSession to the server object.

Type: WebRequestSession
Parameter Sets: (All)
Aliases:

Required: False
Position: 4
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

-Headers

Stores the Headers that should be used for this server

Type: Hashtable
Parameter Sets: (All)
Aliases:

Required: False
Position: 5
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

CommonParameters

This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutVariable, -OutBuffer, -PipelineVariable, -Verbose, -WarningAction, and -WarningVariable. For more information, see about_CommonParameters (http://go.microsoft.com/fwlink/?LinkID=113216).

INPUTS

OUTPUTS

NOTES

AtlassianPS.ServerData

Get-ServerConfiguration

Remove-ServerConfiguration

Export-Configuration