header1   header
header
header Register : : Login header
header
connector   connector
menuleft menuright
submenu   submenu
left
Listing local users, admin and service accounts
Last Post 11 Aug 2010 12:51 AM by Mihail Stacanov. 1 Replies.
Printer Friendly
  •  
  •  
  •  
  •  
  •  
Sort:
PrevPrev NextNext
You are not authorized to post a reply.
Author Messages
Chico76User is Offline
New Member
New Member
Posts:3
Avatar

--
28 Jul 2010 08:50 AM
    Hi all,

    New to Powershell and I was wondering if someone could give me some assistance.

    I'm working on a auditing project where I have to obtain (export to csv) all local accounts (user, admin, service) from a list of servers (500+), which i have to then label them all by adding some content to their description fields.
    The labelling aspect I'm ok with, its the retrieving the info, which I'm lost.
    Some of the servers are DC's and I've read several articles to be aware how this is done as it will pull out a list of all users from the domain , instead of the local ones.

    Thanks in advance
    Mihail StacanovUser is Offline
    New Member
    New Member
    Posts:15
    Avatar

    --
    11 Aug 2010 12:51 AM
    #I am using Quest AD CmdLets for getting a list of Servers
    http://www.quest.com/powershell/act...erver.aspx
    #Gets servers with Windows 2003
    Get-QADComputer -OSName *2003* | ForEach-object `
        {
    #check their ping
        if (Test-Connection $_.name -quiet)
            {
            $c=$_.name
            "++++++++++$c++++++++"
            [string]$strComputer = $c
    #getti active directory services interfaces object
            $computer = [ADSI]("WinNT://" + $strComputer + ",computer")
    #getting all local users with their description
            $computer.psbase.children | Where-Object { $_.psbase.schemaclassname -eq 'user' } | Format-Table Name, Description -autoSize
    #trap for any errors
            trap {'{0}' -f $_.Exception.Message; continue}
            }
        }
    http://proproit.com
    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