Purpose
The purpose of this article is to explain how to use the PowerShell cmdlet Connect-PSUServer to connect to your PowerShell Universal instance.
Background
Connect-PSUServer is part of the PowerShell Universal PowerShell module available on the PowerShell Gallery. This cmdlet is used first to establish the connection which allows all other commands within the module to interact with the PSU instance.
Procedure
The below information is to help get you started with using Connect-PSUServer to connect to your PSU instance. This is not intended as a best practice in your production environment.
1. From the PowerShell Universal console, navigate to Security -> Tokens
2. Select 'Add New App Token'
3. Create the token with Identity of 'admin' and a role of 'Administrator'. It is a best practice to set a finite expiration date on any privileged tokens.
4. After creating the token, you should see it in the list and be able to click the 'Copy' button to copy the token to your clipboard
5. Use the token with Connect-PSUServer to connect to your PowerShell Universal instance per below:
(figure shows using Connect-PSUServer, note the output when the connection is successful)
Be sure to explore the full range of cmdlets available in the PowerShell Universal PowerShell module