Go Premium for a chance to win a PS4. Enter to Win

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 304
  • Last Modified:

Powershell-PowerGui View list of servers user can logon to

1) I have various service accounts that I have to change the passwords for in AD.

1) They run SQL services on various SQL servers.

3) Is there a way to list the servers the account as the "logon" rights to?

I thought it was in the "TSAllowLogon" setting  by using Powergui and "get-qaduser". However the entry is blank.

The process I have to go through now is to search for the ID in ADUC -> view properties of the ID -> clck on the "Account" tab -> click on the "LogOnto" tab and then write down the list of servers.

LogOnto picture
I'd like to automate this. I'm limited to PowerShell V2 and the use of the "Quest.ActiveRoles.ADManagement" PSSnappin.

Any help would be greatly appreciated.
0
Lobsterguy
Asked:
Lobsterguy
  • 2
1 Solution
 
Joe KlimisCommented:
HI

I dont have the Quest addon

but i think this may help

get-qaduser svc*@yourdomain.com -dontusedefaultincludedproperties -objectattributes @{userWorkstation='*'} | format-list LogonName,userWorkstation

Open in new window

0
 
LobsterguyAuthor Commented:
I came up with basically the same thing back in February.

Get-QADUser $user -IncludedProperties userWorkstations | Select-Object userWorkstations

Open in new window

0
 
LobsterguyAuthor Commented:
Aside from how long it took for someone to respond, this method works as well and points are awarded.
0

Featured Post

NEW Veeam Backup for Microsoft Office 365 1.5

With Office 365, it’s your data and your responsibility to protect it. NEW Veeam Backup for Microsoft Office 365 eliminates the risk of losing access to your Office 365 data.

  • 2
Tackle projects and never again get stuck behind a technical roadblock.
Join Now