PowerShell Cmdlets for Licensing Services
Updated: March 10, 2009
The version of Windows Server 2008 that is included in Windows EBS contains a Windows PowerShell snap-in that serves as the application programming interface (API) to the licensing technology for managing client access licenses (CALs). The snap-in is registered by default on the Management Server, and it includes the following cmdlets that you can use to access functionality in the licensing services:
| Cmdlet | Description |
|---|---|
|
Set-Cal |
Assigns a CAL to a user or device. |
|
Clear-Cal |
Removes a CAL from a user or device. |
|
Get-CalAssignment |
Returns all of the users and devices that have CALs assigned to them. |
|
Get-CalSummary |
Returns a summary of each installed CAL pack. |
|
Get-InstalledCalPack |
Returns a list of installed CAL packs. |
|
Install-CalPack |
Installs a CAL pack with a specified product key. |
|
Resolve-CalPackfromProductKey |
Returns CAL pack details for a specified product key. |
Help is available for each licensing cmdlet in the snap-in. You can add the snap-in during a Windows PowerShell session and then use the get-help command to view more information about each cmdlet.
To add the snap-in during a Windows PowerShell session and view the cmdlet Help-
On the Management Server, click Start, click All Programs, click Windows PowerShell 1.0, and then click Windows Powershell.
-
At the PowerShell command prompt, type Add-PsSnapin Microsoft.BusinessServer.Licensing.PowerShell.
-
To view a Help topic about a cmdlet, type get-help <cmdletName>, where cmdletName is one of the licensing API cmdlets. For example, to view help for the Set-Cal cmdlet, type get-help Set-Cal.
For more information about Windows PowerShell, see the Windows PowerShell technical library at the Microsoft Web site (http://go.microsoft.com/fwlink/?LinkId=128018).
For more information about managing CALs with Windows EBS, see Client Access Licenses at the Microsoft Web site (http://go.microsoft.com/fwlink/?LinkID=108930).
