New-DSSession
Synopsis
Establishes a connection with your Devolutions Server instance.
Syntax
Credentials
New-DSSession [[-Credential] <pscredential>] [-BaseUri] <string> [-DomainId <string>]
[-Timeout <int>] [-AsApplication] [-UseOAuth] [-AsLegacyResponse] [<CommonParameters>]WindowsAuthentication
New-DSSession [-BaseUri] <string> -WindowsAuthentication [-DomainId <string>] [-Timeout <int>]
[-AsApplication] [-UseOAuth] [-AsLegacyResponse] [<CommonParameters>]Description
Establishes a connection with your Devolutions Server by retrieving server informations and setting global variables that are required for accessing the API.
Examples
Example 1
PS C:\> $SecurePassword = ConvertTo-SecureString 'YourPassword' -AsPlainText -Force;
$SessionData = @{
BaseURI = "Your/DVLS/Instance/URL"
Credential = New-Object System.Management.Automation.PSCredential ($YourUsername, $SecurePassword)
};Authenticate with the splatting of the hash table containing the required parameters.
Example 2
Authenticate by using the parameters.
Example 3
Authenticate using an application user.
Example 4
A Windows user authenticates themselves with their logged account.
Example 5
Authenticate using OAuth in a web browser.
Parameters
-AsApplication
Required when using an application user to authenticate
-AsLegacyResponse
In versions prior to 2024.2, many DS cmdlets returned a ServerResponse object. Enabling this backward compatibility switch allows scripts developed for earlier versions to function correctly.
-BaseUri
URL to your Devolutions Server instance
-Credential
PSCredential with your Devolutions Server username and password
-DomainId
-Timeout
Polling delay in seconds. Default value is 15 seconds. The value must be between 3 and 600 seconds.
-UseOAuth
Use OAuth in a web browser.
-WindowsAuthentication
Use Windows Authentication. Must be on Windows.
CommonParameters
This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutBuffer, -OutVariable, -PipelineVariable, -ProgressAction, -Verbose, -WarningAction, and -WarningVariable. For more information, see about_CommonParameters.
Notes
For more information, type "Get-Help New-DSSession -detailed". For technical information, type "Get-Help New-DSSession -full".
Last updated
Was this helpful?