The Event Zero Ranger PowerShell module is a powerful set of commands for automating many of the administrative functions of Event Zero's Ranger application.
The Ranger PowerShell commands are available in a PowerShell module available from the Download page. Copy this on the server you wish to run commands before executing any Ranger PowerShell scripts. Extract the files to anywhere on the path listed in the PSModulePath. Microsoft do not recommend using the C:\Windows\system32\WindowsPowerShell\v1.0\Modules\ directory for non-system modules. (Details on Microsoft's recommendations for setting up a PowerShell you can read the details here) If you do not have another directory we suggest the following:
PowerShell should be started in Administrative mode to avoid permissions issues. To start PowerShell in administrative mode, right click the PowerShell icon and select "Run as administrator"
If you are running Windows 8/2012 or higher, the module will load automatically as required. Older versions of Windows require you to run:
Import-Module EzUdm |
Most Ranger PowerShell commands require authentication to the Ranger server. There are three ways to enter credentials for usage in PowerShell scripts:
We recommend using either method 1 or 2 for ease of use and security unless you require the use of scheduled, unattended script execution.
Simply run the following command to securely enter your Ranger credentials for use with other Ranger PowerShell commands:
$Cred = Get-Credential |
This is a multistep process that is performed once in order to securely store the password for automated script usage. To run this script, you must log onto the selected server that will be running the unattended script as the account used for script execution. The file generated by this process is only usable from the computer and user account where it was generated.
Once complete, the password will be available for any unattended script. To retrieve the encrypted password for use in scripts, use these line in your script:
$UserName = "<RangerUserName>" $Password = Get-Content Password.txt | ConvertTo-SecureString $Cred = New-Object System.Management.Automation.PsCredential($UserName, $Password) |
The credentials are now available for use in commands requiring authentication.
Before running any Ranger-specific PowerShell commands, you have to connect to the Ranger server using the following command, if you do not enter the -credentials switch you are prompted to enter logon credentials at this point.
Connect-UDMServer -Server https://<Ranger ServerFQDN> -credentials $Cred |
Once the above is complete, you will be able to run scripts and commands as required. Once you have connected to the server you will be able to issue Ranger PowerShell commands for the duration of the session..
For a complete list of the available commands please click see the PowerShell Commands page.
For example scripts, data templates, and more, see /wiki/spaces/RAN/pages/99198801.
The Ranger PowerShell Module can be downloaded free from the Event Zero web site at https://eventzero.com/download.