KB0033 - How to use Connect-PSUServer

KB0033 - How to use Connect-PSUServer

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)

6. You are now able to use the full range of cmdlets in the PowerShell Universal PowerShell module to interact with and automate your administrative functions.



Be sure to explore the full range of cmdlets available in the PowerShell Universal PowerShell module


    • Related Articles

    • OpenID Connect does not work with HTTP

      Version: Any Problem: When configuring PowerShell Universal OpenID Connect authentication, the server will return a 500 error when attempting to authenticate.  Root Cause Chrome 80 introduced new settings that require cross-site cookies to be secure. ...
    • KB - 1008 Tax/VAT Exempt at checkout

      Scope In this article you will learn how to make a tax-free purchase at checkout. Problem How do you remove the Tax/VAT on an order? Impact Orders will then need to be refunded for tax if processed without the tax deducted. Resolution Follow the ...
    • KB0068 - Group Membership Claims are Missing when using OpenID Connect (OIDC) and Azure Entra ID (Azure AD)

      Scope This issue affects users wishing to retreive group membership claims from Azure Entra ID (formerly, Azure Active Directory) using OpenID Connect (OIDC) authentication. Problem Not group membership claims are available within Apps while using ...
    • KB0058 - PowerShell Universal Browser Times Out Before Session Timeout When Using OIDC

      Affected Versions - All Support Versions Problem Setting the session timeout in appsettings.json does not have an affect on how soon the user is logged out from their session. Root Cause When using OpenID Connect, the -UseTokenLifetime parameter ...
    • KB0012 - High Availability

      Update Please see the documentation at https://docs.powershelluniversal.com/config/hosting/high-availability for in-depth details on this topic. Below is an overview statement from Adam Driscoll on this topic as well. Adam's statement Our high ...