Token Based Software Activation with RPS Runbooks
Last updated on April 14, 2021.
Last Reviewed and Approved on PENDING REVIEW
Intended Audience
This document is intended for use by the Lead Service Integrator (LSI) or developer.
Introduction
During a new vehicle field activation, you will likely need to activate a Windows Operating System and/or Microsoft Office Products. There are three primary methods that can be used: PowerShell, runbooks, and through the Web User Interface. This article will demonstrate how to activate software using runbooks.
Assumptions
The following is assumed prior to performing the actions described in this article:
- You have access to the certificate (token), the public certificate, and issuance license file mentioned in the requirements below.
- You have access to PowerShell and/or RPS Graphic User Interface (GUI or UI).
- You are assigned to the appropriate role to make the changes you intend to make.
Token Based Activation Requirements and Pre-Requisites
Runbook Pre-Requisites
To activate Microsoft products with runbooks via token based activation, three things are needed:
The certificate (token) that will be used to activate the software.
The public certificate from the Certificate Authority that signed the activation token.
The issuance license file that defines what software products will be activated.
To activate Windows software with runbooks in RPS, the following runbooks may be used:
Set-WindowsActivation: used to activate Windows OS.
Set-OfficeActivation: used to activate Office products.
Verifying Runbook Requirements
In order to activate Windows or Office with their respective runbook, you must first verify that the following exist:
Certificates (See Token Based Software Activation with PowerShell).
Software License Resource Item (See Token Based Software Activation with PowerShell).
Runbook TargetItem Pre-Requisites: Certificates & Roles
The runbook will be run against a TargetItem. This TargetItem must have two certificates assigned with the following roles:
- WindowsActivation
- WindowsActivationCA
RPS ResourceItem Pre-Requisites
RPS must have a ResourceItem with the following:
Type
of "SoftwareLicense".Role
of "Windows".
Activating Software with RPS Runbooks
Establish a Working Session
Before activating any software, you must establish your working session. To do so, execute the following PowerShell Command in PowerShell ISE Administrator Mode.
Important
Start by establishing your working session in PowerShell ISE Administrator Mode.
Search for PowerShell ISE by typing PowerShell ISE in the Cortana Search bar.
Click on Run As Administrator.
Figure 1: Open PowerShell ISE as Administrator.
Activation
Note
Any component of the PowerShell scripts below that are bookended by double quotes, must be replaced with use specific data (i.e., setting your own password).
Activating the Windows OS on Server1
After establishing your session in PowerShell ISE, execute the following cmdlets to activate Windows OS:
$task = Get-RpsTaskItem -WorkflowName "Set-WindowsActivation"
$target = Get-RpsTargetItem -Type "VirtualMachine" -Name "Server1"
$assignment = New-RpsTaskAssignment -TaskItem $task -TargetItem $target
Activating Office Products on Server1
After establishing your session in PowerShell ISE, execute the following cmdlets to activate Microsoft Office Products:
$task = Get-RpsTaskItem -WorkflowName "Set-OfficeActivation"
$target = Get-RpsTargetItem -Type "VirtualMachine" -Name "Server1"
$assignment = New-RpsTaskAssignment -TaskItem $task -TargetItem $target