QAD cmdlets FAQ

From PowerGUI Wiki

Jump to: navigation, search

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:

  1. Open your PowerShell profile (for example, by starting PowerGUI Script Editor and selecting File / Open Current User Profile).
  2. 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:

  1. Use the -IncludeAllProperties parameter to retrieve full set of attributes (warning: this affects performance and memory consumption):
    Get-QADUser username -IncludeAllProperties | Format-Table name, employeeID, Division
  2. Use the -IncludedProperties parameter to specify which additional properties need to be retrieved:
    Get-QADUser username -IncludedProperties employeeID,division | ft name,employeeID,Division
  3. Change the default set of properties retrieved for user objects by using the Set-QADPSSnapinSettings cmdlet with parameter -DefaultOutputPropertiesForUserObject.

Working with Terminal Services attributes

See these blog posts for details:

Create/update accounts from CSV

See these blog posts for details:

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
Personal tools