- 01 Apr 2025
- 2 Minutes to read
- Print
- DarkLight
- PDF
PowerShell
- Updated on 01 Apr 2025
- 2 Minutes to read
- Print
- DarkLight
- PDF
Introduction
The Nectar DXP PowerShell module allows administators greater control over their Nectar DXP environment. Nearly every element available in the UI is available in PowerShell.
Installation
The Nectar DXP PowerShell module is available via the standard Microsoft PowerShell Gallery. It can be installed either manually or using Install-Module. If you've previously installed an older version of the Nectar DXP PowerShell module manually, it is recommended to remove the old module before proceeding:
PowerShell-Based installation
- Open a PowerShell session
- Run the following command, accepting any warnings about installing from an untrusted repository:
# If you have admin permissions to your workstation
Install-Module Nectar10
# If you do not have admin permissions to your workstation
Install-Module Nectar10 -Scope CurrentUser
Setting the Execution Policy
By default, PowerShell does not allow the execution of 3rd party modules. To allow the Nectar PS module to function, you may have to modify the PowerShell execution policy to allow scripts.
# If you have admin permissions
Set-ExecutionPolicy AllSigned
# If you do not have admin permissions
Set-ExecutionPolicy AllSigned -Scope CurrentUser
Manual Installation
If you do not have access to the PowerShell Gallery, you can still install the Nectar DXP module manually.
- Download the latest version of the Nectar DXP PowerShell module below.
- Unblock the file if necessary, by right-clicking the zip file, clicking on Properties then clicking Unblock.
3. Unzip the contents into a folder called Nectar10 in the following location:
%ProgramFiles%\WindowsPowerShell\Modules
Initial Start-Up
- Open a PowerShell window.
- Connect to a Nectar DXP environment by typing:
Connect-NectarCloud -CloudFQDN nectarcloud.contoso.com
If you receive the error "The 'Connect-NectarCloud' command was found in the module 'Nectar10', but the module could not be loaded", you may have to set your PowerShell execution policy to allow remotely signed scripts. To do so, run the following command:
Set-ExecutionPolicy RemoteSigned
- To see a list of available commands, type the following to get started:
Get-Command -Module Nectar10
- For help with a specific command, such as Connect-NectarCloud type:
Get-Help Connect-NectarCloud -Full
Updating
If the Nectar DXP PowerShell module was installed via Install-Module, it can be updated by running the following command:
Update-Module -Name Nectar10
If the module was installed manually, download the latest .ZIP file and overwrite the existing files in %ProgramFiles%\WindowsPowerShell\Modules with the updated versions.
Removal
If you installed the Nectar DXP PowerShell module via the PowerShell Gallery, uninstall the module by opening a PowerShell session in Administrative mode and type the following:
Uninstall-Module Nectar10
If you installed the Nectar DXP PowerShell module manually, simply remove the Nectar10 folder from the following location:
%ProgramFiles%\WindowsPowerShell\Modules