-
Notifications
You must be signed in to change notification settings - Fork 2
Install PowerShell Module
The Centrify Platform PowerShell SDK is a PowerShell Script Module named Centrify.Platform.PowerShell delivered inside a folder of the same name.
You can use it by importing the module into a PowerShell session using the Import-Module cmdlet.
Example:
Import-Module .\Centrify.Platform.PowerShell\Centrify.Platform.PowerShell.psm1
To make import of this module easier, it can be installed on a Windows system under the default PowerShell Module location, or by using the provided installation script.
Execute:
#################################################
# Centrify.Platform.PowerShell Module Installer #
#################################################
Centrify Platform PowerShell module detected on this system under 'C:\Program Files\Centrify\PowerShell\'
Centrify Platform PowerShell module will be using Installation path:
'C:\Program Files\Centrify\PowerShell\Centrify.Platform.PowerShell'
Installing module.
86 files copied.
Centrify Platform PowerShell module installed under 'C:\Program Files\Centrify\PowerShell\'
PS C:\Users\Fabrice\Documents\GitHub\Powershell-SDK>Note that installation script must be executed with local admin privileges as it will copy files under C:\Program Files\ and add entries to the PSModulePath environment variable.
If you run this script for the first time on a Windows system, it will automatically install the module for you. Otherwise follow on screen instruction to decide what operation to perform (re-install/upgrade, uninstall).
Execute:
PS C:\Users\Fabrice\Documents\GitHub\Powershell-SDK> .\Install-CentrifyPlatformSDK.ps1
#################################################
# Centrify.Platform.PowerShell Module Installer #
#################################################
Centrify Platform PowerShell module detected on this system under 'C:\Program Files\Centrify\PowerShell\'
Centrify Platform PowerShell module will be using Installation path:
'C:\Program Files\Centrify\PowerShell\Centrify.Platform.PowerShell'
The Centrify Platform PowerShell module is already installed.
Choose action to perform:
[R] - Repair/Upgrade Module by deleting and re-installing all files.
[U] - Uninstall and exit.
[C] - Cancel and exit.
[R] Repair [U] Uninstall [C] Cancel [?] Help (default is "C"): r
Repairing/Upgrading Module.
Centrify Platform PowerShell module 'C:\Program Files\Centrify\PowerShell\Centrify.Platform.PowerShell' deleted
86 files copied.
Centrify Platform PowerShell module installed under 'C:\Program Files\Centrify\PowerShell\'
PS C:\Users\Fabrice\Documents\GitHub\Powershell-SDK>
Once installed the module can then be imported by name instead of specifying the path to its psm1 file.
Execute:
Import-Module Centrify.Platform.PowerShell