Skip to main content

Connect-HaloAPI

Generated Cmdlet Help

This page has been generated from the HaloAPI PowerShell module source. To make changes please edit the appropriate PowerShell source file.

SYNOPSIS

Creates a new connection to a Halo instance.

SYNTAX

Connect-HaloAPI -URL <Uri> -ClientID <String> -ClientSecret <String> [-Scopes <String[]>] [-Tenant <String>]
[-AdditionalHeaders <Hashtable>] [-UseKeyVault <Boolean>] [-SecretName <String>] [-VaultName <String>]
[-SaveToKeyVault <Boolean>] [-Identity <String>] [-MaxRetries <Int32>] [-NoConfirm]
[-ProgressAction <ActionPreference>] [<CommonParameters>]

DESCRIPTION

Creates a new connection to a Halo instance and stores this in a PowerShell Session.

EXAMPLES

EXAMPLE 1

Connect-HaloAPI -URL "https://example.halopsa.com" -ClientId "c9534241-dde9-4d04-9d45-32b1fbff22ed" -ClientSecret "14c0c9af-2db1-48ab-b29c-51975df4afa2-739e4ef2-9aad-4fe9-b486-794feca48ea8" -Scopes "all" -Tenant "demo" -VaultName "MyVault" -SaveToKeyVault $true
This logs into Halo using the Client Credentials authorisation flow and saves the secrets to the specified Azure Key Vault for future use.

PARAMETERS

-URL

The URL of the Halo instance to connect to.

Type: Uri
Parameter Sets: (All)
Aliases:

Required: True
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-ClientID

The Client ID for the application configured in Halo.

Type: String
Parameter Sets: (All)
Aliases:

Required: True
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-ClientSecret

The Client Secret for the application configured in Halo.

Type: String
Parameter Sets: (All)
Aliases:

Required: True
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-Scopes

The API scopes to request, if this isn't passed the scope is assumed to be "all". Pass a string or array of strings. Limited by the scopes granted to the application in Halo.

Type: String[]
Parameter Sets: (All)
Aliases:

Required: False
Position: Named
Default value: All
Accept pipeline input: False
Accept wildcard characters: False

-Tenant

The tenant name required for hosted Halo instances.

Type: String
Parameter Sets: (All)
Aliases:

Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-AdditionalHeaders

Hashtable containing additional parameters to be sent with each request.

Type: Hashtable
Parameter Sets: (All)
Aliases:

Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-UseKeyVault

If $true, retrieve parameters from Azure Key Vault. If $false, use parameters passed to function.

Type: Boolean
Parameter Sets: (All)
Aliases:

Required: False
Position: Named
Default value: False
Accept pipeline input: False
Accept wildcard characters: False

-SecretName

The name of the secret in the Azure Key Vault.

Type: String
Parameter Sets: (All)
Aliases:

Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-VaultName

The name of the Azure Key Vault.

Type: String
Parameter Sets: (All)
Aliases:

Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-SaveToKeyVault

If $true, save parameters to Azure Key Vault. If $false or not specified, do not save parameters.

Type: Boolean
Parameter Sets: (All)
Aliases:

Required: False
Position: Named
Default value: False
Accept pipeline input: False
Accept wildcard characters: False

-Identity

The object ID of the Managed Identity or Service Principal.

Type: String
Parameter Sets: (All)
Aliases:

Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-MaxRetries

The maximum number of times to retry requests before giving up.

Type: Int32
Parameter Sets: (All)
Aliases:

Required: False
Position: Named
Default value: 10
Accept pipeline input: False
Accept wildcard characters: False

-NoConfirm

Don't return a boolean to confirm the connection status.

Type: SwitchParameter
Parameter Sets: (All)
Aliases:

Required: False
Position: Named
Default value: False
Accept pipeline input: False
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.

INPUTS

OUTPUTS

System.Void

NOTES