QAD cmdlets FAQ
From PowerGUI Wiki
Contents |
How to connect to QAD cmdlets outside PowerGUI or ActiveRoles Management Shell?
To load QAD cmdlets for one particular script:
Add this line in the beginning of the script:
Add-PSSnapin Quest.ActiveRoles.ADManagement -ErrorAction SilentlyContinue
To make QAD cmdlets available for all your scripts on a particular computer:
- Open your PowerShell profile (for example, by starting PowerGUI Script Editor and selecting File / Open Current User Profile).
- Add this line to the profile code:
Add-PSSnapin Quest.ActiveRoles.ADManagement -ErrorAction SilentlyContinue
Some properties not retrieved - why?
I run Get-QADUser username | Format-Table name, employeeID, Division and get a nothing for employee id or division. Why?
This is happening because neither of the fields are retrieved in the default set of attributes.
There are a few ways to fix the issue:
- Use the
-IncludeAllPropertiesparameter to retrieve full set of attributes (warning: this affects performance and memory consumption):Get-QADUser username -IncludeAllProperties | Format-Table name, employeeID, Division - Use the
-IncludedPropertiesparameter to specify which additional properties need to be retrieved:Get-QADUser username -IncludedProperties employeeID,division | ft name,employeeID,Division - Change the default set of properties retrieved for user objects by using the
Set-QADPSSnapinSettingscmdlet with parameter-DefaultOutputPropertiesForUserObject.
Working with Terminal Services attributes
See these blog posts for details:
- Managing Terminal Services Attributes with PowerShell
- Terminal Services management System Requirements
Where do I find detailed documentation on QAD cmdlets?
There are a few ways you can get help information for the cmdlets:
- In the PowerShell command-line window: by typing
get-help cmdletname, e.g.get-help Get-QADUser. - In PowerGUI or PowerGUI Script Editor: by selecting the cmdlet in the script code, and pressing F1.
- Online, at the QAD cmdlets reference
