The below procedure describes how to automatically update Cisco CMS personal spaces once created using the LDAP import. This KB requires a configured CMS Admin Mgmt. Console stored within the script execution folder. You can be download the CMS Admin Mgmt. Console here (Login required).
1. Download and Modify the script
Download the PowerShell script here (Login required) and open it using a text editor. Locate the script parameters section and replace the values by the ones corresponding to your environment.
# – Script Parameters ——————————————
# Date since new users have be retrieved. By default 1 day.
$When = ((Get-Date).AddDays(-1)).Date
# Location of the CMSAdm tool. By default within the script execution folder
$CMSAdm=”$PSScriptRoot\CMSAdm.exe”
# $CoSpaceTemplate = “560fe688-14f9-4447-800d-5a141e7d884f”
# The Guest callLegProfile to be assigned to the space
$GuestCallLegProfile = “d3e0d00a-f06d-4154-9dbb-acd7258599f2”
# Guest passcode to be assigned to the space. By default an empty password
$GuestPasscode = “[EMPTY]”;
# Host passcode to be assigned to the accessMethod. By default a random number of 4 digits
$HostPasscode = “[RAND4]”;
# Host callLegProfile to be assigned to the accessMeethod
$HostCallLegProfile = “d3e0d00a-f06d-4154-9dbb-acd7258599f2”
# Host accessMethod name
$HostAccessMethodName = “PRHost”
Locate then the filter creation section and update the value to create a similar pattern than the one set in your CMS configuration under “Configuration > Active Directory Configuration > Username”
# Build CoSpace Filter
$prop = $_ | select sAMAccountName # sAMAccountName | mail | GivenName | CN | …
$filter = “{0}@MyCompany.com”-f $prop.sAMAccountName
2. Create a scheduled task
Navigate to Control Panel\System and Security\Administrative Tools\Task Scheduler and perform the following operations:
1. Create a new task
2. Define the Frequency: “Daily” (Adjust according to your requirements)
3. Define the Action: “Start a Program”
4. Set the program to start:
Program: PowerShell.exe
Arguments: -windowstyle hidden C:\QOScripts\QOUpatePersonalRooms.ps1
5. Save and close the task
Before running the task, ensure that the CMS Admin Mgmt. Console is stored within the script execution folder or under the path defined through the script parameters.