Install the JumpCloud PowerShell Module

PowerShell is a task automation and configuration management framework from Microsoft, consisting of a command-line shell and associated scripting language. The JumpCloud PowerShell Module is a set of PowerShell commands that allow JumpCloud administrators to interact with their JumpCloud directory.

Installing the JumpCloud PowerShell module can be done by running a single command.

Tip:

On Mac or Linux and need to install PowerShell? See Installing PowerShell on Mac and Linux below.

Installing the PowerShell Module

From a Windows PowerShell window launched as administrator, or a terminal window on Mac and Linux where you have launched in PowerShell by running the command pwsh, enter the command:

Install-Module JumpCloud -Scope CurrentUser 

When prompted, press Y to install the JumpCloud PowerShell module:

Untrusted repository You are installing the modules from an untrusted repository. If you trust this repository, change its InstallationPolicy value by running the Set-PSRepository cmdlet. Are you sure you want to install the modules from 'PSGallery'? [Y] Yes [A] Yes to All [N] No [L] No to All [S] Suspend [?] Help (default is "N"):

Authenticating the PowerShell Module

After the JumpCloud module is installed, you will authenticate the module to the JumpCloud API using a JumpCloud API key and the function Connect-JCOnline.

Locate your JumpCloud API key within the JumpCloud Admin Portal. Need help finding your JumpCloud API key? See JumpCloud APIs.

After locating your JumpCloud API key, enter the command Connect-JCOnline and enter your API key when prompted. Example:

/Users/buster>
Connect-JCOnline cmdlet Connect-JCOnline at command pipeline position 1 Supply values for the following parameters: (Type !? for Help.) 
JumpCloudAPIKey:

Tip:

On Mac or Linux? Once PowerShell is installed, remember you must enter the pwsh command within the terminal application to open PowerShell.

A success message will indicate that you have successfully connected to the module. If there is an update available for the module, you will be asked if you would like to update.

Using PowerShell

Find a matrix of copy-and-pastable real work PowerShell examples that have been crowd sourced from JumpCloud customers within the JumpCloud PowerShell Commands Example Library.

To see all of the available commands within the JumpCloud Module, run:

Get-Command -Module JumpCloud

Accessing Built-In Help

PowerShell has a built-in help system. To use this system, type Help [enter command here] -Full to see the full help inside the terminal. For example:

Help Get-JCUser -Full

Or, run Help [enter command here] -Online to see the help in a web browser:

Help Get-JCUser -Online

If you get stuck inside the internal help, press Q to exit.

Installing PowerShell on Mac and Linux

If you are on Mac or Linux, follow this link to locate the PowerShell package for your operating system.

Download the installation media by clicking on the hyperlink next to your operating system under the Downloads (stable) column of the linked table.

Install the PowerShell application on your target system using the downloaded installation media.

Tip:

Need more help? Navigate to the How to Install Instructions link for your operating system in the linked table.

Once PowerShell is installed, PowerShell can be accessed within the terminal application on Mac or Linux system by typing pwsh.

MBP-d3v:~ scottd3v$ pwsh
PowerShell v7.0.0
Copyright (c) Microsoft Corporation. All rights reserved.

https://aka.ms/pscore6-docs
Type 'help' to get help.

PS /Users/scottd3v>

You will be able to tell you are running PowerShell because the root of your terminal command line will switch to PS as seen above.

  • Before calling PowerShell using the pwsh command: MBP-d3v:~ scottd3v$
  • After: PS /Users/scottd3v

Uninstalling the PowerShell Module

When the command "Install-module" is used to install a module from the PowerShell gallery, the contents of the module are saved locally to the system.

To uninstall a module and ensure a clean full uninstallation, remove the module files from the system.

The command "Get-InstaledModule" and the property "InstalledLocation" can be used to query the location of the module files on a system. See the below examples:

Mac

Get-InstalledModule JumpCloud | Select-Object InstalledLocation

InstalledLocation
-----------------
/Users/buster/.local/share/powershell/Modules/JumpCloud/1.12.0

Windows

Get-InstalledModule JumpCloud | Select-Object InstalledLocation

InstalledLocation
-----------------
C:\Users\buster\Documents\WindowsPowerShell\Modules\JumpCloud\1.11.0

Removing the folder "JumpCloud" and its contents from the system will uninstall the module and allow for a clean reinstallation using the "Install-Module" command.

Troubleshooting

In order to install the JumpCloud PowerShell Module from the PowerShell gallery on Windows, you must be running Windows PowerShell version 5.0 or newer and have your Execution Policy set to at least RemoteSigned.

The PowerShell command $PSVersionTable will show what version of PowerShell is installed on a local machine. PSVersion will reveal the version number when using this command:

$PSVersionTable
Name Value 
---- ----- 
PSVersion 5.1.16299.64 
PSEdition Desktop 
PSCompatibleVersions {1.0, 2.0, 3.0, 4.0...} 
BuildVersion 10.0.16299.64 
CLRVersion 4.0.30319.42000
WSManStackVersion 3.0 
PSRemotingProtocolVersion 2.3 
SerializationVersion 1.1.0.1

On Windows machines, the Execution Policy must be set to at least RemoteSigned in order to load the module. The module will install if the Execution Policy is set to Unrestricted or ByPass as well. To see the Execution Policy, run the command Get-ExecutionPolicy. To set the Execution Policy, run the following command in a Windows PowerShell session launched with Administrator permissions:

Set-ExecutionPolicy RemoteSigned

Back to Top

Still Have Questions?

If you cannot find an answer to your question in our FAQ, you can always contact us.

Submit a Case