Hi All,
I am very new to ARS this is probably my 3rd day of playing with it... (that includes starting to learn PS as well..)
I have started of trying to solve an issue in our environment. which included
creating custom form on the portal - done..
creating custom Virtual attribute - done..
using the form to create a user including some virtual attributes - done.
The third part (YES I know this is very backwards but I don't have ANY options)
I need to take the account I just created via the portal page and export to a CSV file, so it can be FTP'ed to the HR solution... (please don't ask!! - Horrible)
So I thought I would run a post create script that exports out the attributes in the correct format
Someone posted this script which will nearly do the job
if ($Request.Class -ine 'user') {exit}
$user = Get-QADUser $Request.Target
$name = $user.givenname
$id = $user.sn
$contact = $user.description
$email = $user.mail
$account = $user.samAccountName
"Licensee=$name
LicID=$id
ContactName=$contact
ContactMail=$email
AcctName=$account" | Out-File C:\P4Accounts\$account.txt
However I need to get some virtual attributes and run the following command that can crash the server!! (At the moment just testing...)
C:\>Get-QADUser CONT12-MAR-1949GregTesti31 -proxy -DontUseDefaultIncludedProperties -IncludedProperties employeeID,
nswhvStartDate,givenName,initials,sn,NSWHV-DateOfBirth,NSWHV-Gender,company | fl employeeID,nswhvStartDate,givenName,ini
tials,sn,NSWHV-DateOfBirth,NSWHV-Gender,company
Is this the best way to export the details to a file? and am I doing something wrong with Get-QADUser that
1) i need to use -proxy so it see the virtual attributes
2) is there a better way.
I think I am running QARS - 6.7.x? However I don't know how to check that..
Thanks
Peter