header1   header
header
header Register : : Login header
header
connector   connector
menuleft menuright
submenu   submenu
left
get-qaduser executable file?
Last Post 26 Apr 2010 01:46 AM by Omit. 2 Replies.
Printer Friendly
  •  
  •  
  •  
  •  
  •  
Sort:
PrevPrev NextNext
You are not authorized to post a reply.
Author Messages Informative
OmitUser is Offline
New Member
New Member
Posts:10
Avatar

--
25 Apr 2010 11:07 PM
    I have a simple script that retrieves user attributes. Our service desk uses it but I would still like to make it a bit more simple for them.

    Script goes: get-qaduser "administrator" -includeallproperties | fl createTimeStamp,pwdLastSet,badPwdCount,logonCount,whenChanged,mail,whenCreated,distinguishedName,
    badPasswordTime,cn,Email,FirstName,LastName,LogonName,HomeDirectory,HomeDrive,UserPrincipalName,
    AccountExpires,PasswordLastSet,PasswordAge,PasswordExpires,LastLogonTimestamp,LastLogon,LastLogoff,
    AccountIsDisabled,A,ccountIsLockedOut,PasswordNeverExpires,UserMustChangePassword,AccountIsExpired,
    PasswordIsExpired,AccountExpirationStatus,PasswordStatus,NTAccountName,SamAccountName,
    CanonicalName,CreationDate,ModificationDate,ParentContainer,ParentContainerDN,Name,Guid,Sid,DisplayName

     ..collecting the required attribs for users.

    Now SD needs to edit the script to set the specific user each time. Is there a way to get the script prompt for the username?

    And what i'd also like to know is how can I make this an executable file to the windows desktop that they could just click and type in the username?
    Vishal RamnaniUser is Offline
    New Member
    New Member
    Posts:68
    Avatar

    --
    26 Apr 2010 12:29 AM
    Just prefix the below codes to the script...

    #--------------------
    #Script Starts

    Param ($user)

    #Put this variable in the query...

    Get-QADUser -id $user ..... #rest of it goes the same.

    #To Run command.

    QueryUserAttributes.ps1 -user

    Thanks.
    Vishal Ramnani
    MCITP - Exchange 2007, MCSE Messaging, MCTS - Win 2008 Config
    OmitUser is Offline
    New Member
    New Member
    Posts:10
    Avatar

    --
    26 Apr 2010 01:46 AM
    For some reason it only get's the first user (Administrator) from AD. Param ($user) get-qaduser -id $user -includeallproperties | fl createTimeStamp,pwdLastSet,badPwdCount..... Am I missing something? And is it possible to create a bat file out of this?
    You are not authorized to post a reply.


    Active Forums 4.3
    right
    footer   footer
    footer Sponsored by Quest Software • SAPIEN Technologies • Compellent • Microsoft Windows Server 2008 R2 footer
    footer   footer