Page 1 of 1

PrimalForms Quest AD ActiveRoles

Posted: Fri Jun 25, 2010 5:15 am
by chroswalt
I'm working on a simple little app to show off the power of Primal Forms so I can convince the approvers to approve, but I'm running into a perplexing problem.
The application lets an administrator quickly add users to Citrix groups and view/create Terminal Services Profile and Home Directory. The application is using Quest AD Active Roles. You type in the name of the user and click Retrieve User(s) button and the list box populates with the user name. You can then click on the select user in the list box and the TS Profile Path, Drive, and Home Directory populate.

The problem is TSProfilePath, TSHomeDirectory, or any TS information isn

PrimalForms Quest AD ActiveRoles

Posted: Fri Jun 25, 2010 6:53 am
by Alexander Riedel
You probably don't load the Quest AD snapin in your PrimalForms application. The standard shell processes a profile that normally loads those.
Applications should not depend on any specific profile so you need to load any needed snapins and modules explicitly.

PrimalForms Quest AD ActiveRoles

Posted: Fri Jun 25, 2010 7:02 am
by chroswalt
I have the following command inside the OnApplicationLoad function: Add-PSSnapin "Quest.ActiveRoles.ADManagement"

I can run Get-QADUser and return DisplayName, SAMAccountName, etc, but it doesn't return TS information. Here is an excert of the command $Users | Format-List | Out-Host

UserPrincipalName : username@domain.comTsProfilePath : TsHomeDirectory : TsHomeDrive : TsAllowLogon : TsRemoteControl : TsMaxDisconnectionTime : TsMaxConnectionTime : TsMaxIdleTime : TsReconnectionAction : TsBrokenConnectionAction : TsConnectClientDrives : TsConnectPrinterDrives : TsDefaultToMainPrinter : TsWorkDirectory : TsInitialProgram : AccountExpires : PasswordLastSet : 9/99/9999 7:58:15 AMPasswordAge : 999.07:58:42.4235429PasswordExpires : LastLogonTimestamp : 6/22/2010 6:16:04 PMLastLogon : 6/24/2010 6:22:58 PMLastLogoff : AccountIsDisabled : FalseAccountIsLockedOut : FalsePasswordNeverExpires : TrueUserMustChangePassword : FalseAccountIsExpired : FalsePasswordIsExpired : FalseAccountExpirationStatus : NeverPasswordStatus : NTAccountName : domainusrnameSamAccountName : usrnameSecurity : Quest.ActiveRoles.ArsPowerShellSnapIn.UI.SecurityD escriptorDomain : domain

PrimalForms Quest AD ActiveRoles

Posted: Fri Jun 25, 2010 6:16 pm
by Alexander Riedel
What OS are you running this on? 32 or 64 bit?

PrimalForms Quest AD ActiveRoles

Posted: Tue Jun 29, 2010 1:36 pm
by chroswalt
I am running 64bit Windows 7.

PrimalForms Quest AD ActiveRoles

Posted: Wed Jun 30, 2010 2:41 am
by Alexander Riedel
Try packaging your script as a 64 bit application in PrimalForms and running the resulting exe. Does that make a difference?

PrimalForms Quest AD ActiveRoles

Posted: Wed Jun 30, 2010 5:51 am
by chroswalt
Yes that worked!
Why do I have specify compile it versus using the run? Is it because it needs to use the x64 bit verion of Active Roles?

Thank for the help.

PrimalForms Quest AD ActiveRoles

Posted: Wed Jun 30, 2010 6:48 am
by Alexander Riedel
The current version of PrimalForms is 32bit, so when it runs it internally it executes with the 32 bit version of PowerShell and the 32 bit version of the Quest plugin.
I am assuming that the terminal server information is not accessible to a 32 bit process or simply not supported by the Quest plugin. You'd have to ask Quest for the actual details of the differences.


PrimalForms Quest AD ActiveRoles

Posted: Wed Jun 30, 2010 7:34 am
by chroswalt
Aw, you're absolutly right.
I loaded up powershell using: %SystemRoot%syswow64WindowsPowerShellv1.0powershell.exe
and then loaded the Quest Active Roles using the command: Add-PSSnapin "Quest.ActiveRoles.ADManagement"

I then ran the command: Get-QadUser username | format-list. As you explained all the TS information was absent.

If I do the same by loading Powershell using:
%SystemRoot%system32WindowsPowerShellv1.0powershell.exe
The TS information is there.

Thanks again this will definitely help to show the value of the product.