< Back

New-BMSession

Sun Jan 12, 2020 7:19 pm

NAME New-BMSession



SYNOPSIS

Creates a session object used to communicate with a BuildMaster instance.





SYNTAX

New-BMSession [-Uri] <Uri> [-ApiKey] <String> [<CommonParameters>]





DESCRIPTION

The `New-BMSession` function creates and returns a session object that is required when calling any function in

the BuildMasterAutomation module that communicates with BuildMaster. The session includes BuildMaster's URI and

the credentials to use when making using BuildMaster's API.





PARAMETERS

-Uri <Uri>

The URI to the BuildMaster instance to use.



Required? true

Position? 1

Default value

Accept pipeline input? false

Accept wildcard characters? false



-ApiKey <String>

The API key to use when making requests to BuildMaster.



Required? true

Position? 2

Default value

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



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



PS C:\\>$session = New-BMSession -Uri 'https://buildmaster.com' -Credential $credential



Demonstrates how to call `New-BMSession`. In this case, the returned session object can be passed to other

BuildMasterAutomation module function to communicate with BuildMaster at `https://buildmaster.com` with the

credential in `$credential`.











RELATED LINKS