Find list of local Administrators in all server of domain

Hi Team,
I have around 1000 server running in my domain, I need to find out Member of local administrator in all the servers of domain. do we have any script which can full fill my requirement.  ?
Regards, Triyambak

Hi Triyambak,
Olaf Reitz's script should work, just a little clarification:
You can export all the servers' name to a .txt file, then use the foreach to loop all servers.
command" to remote access, you need to enable Windows PowerShell remoting on the remote servers Firstly, which can be achieved by GPO:
Enable and configure Windows PowerShell Remoting using Group Policy
Then we can Run "invoke-command" to remoting:
$computernames=Get-Content d:\servers.txt
Foreach($computername in $computernames){
invoke-command {
$members = net localgroup administrators |
where {$_ -AND $_ -notmatch "command completed successfully"} |
select -skip 4
New-Object PSObject -Property @{
Computername = $env:COMPUTERNAME
Group = "Administrators"
Members=$members
} -computer $computername -HideComputerName |
Select * -ExcludeProperty RunspaceID
If you have any feedback on our support, please click here.
Best Regards,
Anna
TechNet Community Support

Similar Messages

  • How to find out when was local administrators group changed

    Hi
    Is there any way how to find out when was user added to local administrators group on server(2003 to 2012) ?

    Hi,
    If you have auditing enabled for "Audit account management" and your security logs are not overwritten then you can look for a 4732 or 636 (Windows 2003) event ids.
    https://technet.microsoft.com/en-us/library/cc737542(v=ws.10).aspx
    https://technet.microsoft.com/en-us/library/dd772663(v=ws.10).aspx
    Hope it helps.
    Regards,
    Calin

  • How to get a list of Local Users who has not logged in for 3 months or around 90 days

    hi
    i found this thread to pull out a list of local users
    Retrieve all local user accounts information on remote computers (PowerShell)
    however, i need to filter out users who has not logged in for 3 months or around 90 days, how can i do further filtering?
    i understand dsquery has an -inactive <xweeks> , however i am doing it for local accounts

    $ErrorActionPreference = "silentlycontinue"
    $([ADSI]"WinNT://$env:COMPUTERNAME").Children | where {$_.SchemaClassName -eq 'user' -and $_.lastLogin -gt (Get-Date).AddDays(-90)} | ft name,lastlogin
    using the sample from the link extendend with the 90 days criteria, the erroraction preference surpresses the errors you get for accounts with no lastlogon value (guest being a typical one)

  • Find workstations with specific group in local administrators group

    Hello,
    Is there a simple script that will search the workstations in a domain looking for the existence of a specific domain group nested in the local administrators group ?  Our desktop group can up with the idea of using domain groups nested in the local
    admin group to grant administrator privileges to specific computers.  They can list the members of the domain group easily but they have no easy way to know on what workstations they have added the group to.  Output I am looking for is simply a list
    of computers that have the specific group in the administrators group.   Any advice would be appreciated.
    Bobby

    Thisis donethrough Group Policy.  It is a special aspect of gP to set and mamintain groups on local machines.  You can protect a machine fromchanges and allow users to be added and removed.
    If you are just look ing to list tehcontents o a local group then get the module "Local Administration" in the Repository. It has all of the tools you need.
    You can also use WMI to retrieve Group memmbership.
    ¯\_(ツ)_/¯

  • List files in Finder by file type (not just all in alphabetical order)

    Hello,
    Is there a way to list the files in Finder by type.
    By default all files and folders are listed in alphabetical order.
    I, however, would like to list the subjects by type (i.e. all folders first, then single files etc.)
    Thanks in advance...
    Power Mac 2 x 2.0 GHz   Mac OS X (10.3.9)  

    Is there a way to list the files in Finder by type.
    Sorry, I don't have my 10.3 booted at the moment, but in 10.4 in List View you would normally have a Kind column at the far right. If you click on the top of this it may sort the way you want. Also the Kind column can be moved to the left if you want.

  • How do I find list of all apple equipment that I have purchased

    How do I find list of all apple equipment that I have purchased

    If you have registered them see here:
    https://supportprofile.apple.com

  • How to find List of  all materials of exceptions 15 in  MD04 ?

    Dear all,
    In MD04 , we get single material with dates,order, exception , etc..... details.
    If i want to know the all materials having exception 15 - rescheduling out , How to find ?

    No. I could not get answer.
    I want to find List of  all materials of exceptions 15 only.

  • LDAP Query for particular user account in local Administrators group on All Enabled Computer Accounts

    Need to query on all enabled computer accounts that have a particular user account present in the local Administrators group.
    Ldap query is best, because not all our machines have SCCM client
    Thanks for any help you can provide. Lisa

    Ya, I have 41800+ computer accounts in my directory. I think that option is not feasible :) Thanks for your reply.
    I can use SCCM to do this too, but only for those that the client is running on and which are online. Thanks again.
    Hope is not all lost; a scripting solution is still possible.  The difference is instead of running a central script to pull info from all computers, you let the computers report back to you with the info.
    If I were you, I'd do the following:
    1) Create a file share and adjust the permissions so that "Domain Computers" have "Modify" Permissions.
    2) Create a script similar to the 2nd link I posted above, with a bit of adjustment:  at the end of the script, write the information to the file share created in (1), and name the file
    ComputerName.txt
    3) Use Group Policy Preference Scheduled Task to deploy the script, and make sure it only runs once.
    4) Happily wait for the results to come back :)
    The main benefit of this approach is you're not restricted by the computer connectivity at the moment you run the script.  This is especially true if you have many mobile computers in your environment.  Just wait for a reasonable time (they all need
    to come back to the mother ship once a while don't they?) and the results will show up in the file share you created.
    Cheers.

  • What is the difference between using the command "dsmgmt" and the "Managed By" tab when adding users to the local administrators Account on a Read-Only Domain Controller?

    When I use the
    "dsmgmt" command to add a user to the local administrators account of a RODC I can actually see the user when I use the "Show Role Administrators" parameter. However, I can't see the members of the
    group added to the "Managed By" tab of the RODC object in AD. Even though, the users added using
    "dsmgmt" and by the "Managed By" tab can all log in locally and have admin rights to the RODC. Are there any differences between these two ways of adding users to the local administrators account? 

    Hi,
    For groups, managedBy is an administrative convenience to designate “group admins”. Whatever principal listed in
    managedBy gets permission to update a group’s membership (the actual security is updated on the group’s AD object to allow this).
    In Win2008 and later managedBy also became the way you delegated local administration on an RODC, allowing branch admins to install patches, manage shares, etc. (http://technet.microsoft.com/en-us/library/cc755310(WS.10).aspx). 
    On the RODC, this is updating the RepairAdmin registry value within RODCRoles.
    So the difference between them should be only the way they do the same thing.
    For more details, please refer to the below article:
    http://blogs.technet.com/b/askds/archive/2011/06/24/friday-mail-sack-wahoo-edition.aspx
    We
    are trying to better understand customer views on social support experience, so your participation in this
    interview project would be greatly appreciated if you have time.
    Thanks for helping make community forums a great place.

  • The list of workflow actions on the server references an assembly that does not exist

    Hi,
    This issue has been discussed many times in this forum , the reason why I am posting is I tried the resolution steps but I dont see any luck.
    I am getting the below message from the SharePoint designer 2007 when I am trying to modify a workflow
    "This list of workflow actions on the server references an assembly that does not exist. Some actions will not be available. The assembly strong name is Microsoft.SharePoint.WorkflowActions, Version=12.0.0.0, Culture=neutral, PublicKeyToken=71e9bce111e9429c.
    Contact your server administrator for more information."
    #1 : One of the post says "Normally you would see that error because someone has extended the Workflow actions available in SPD with a custom action developed in Visual Studio.  These custom actions are loaded when your workstation reads the WSS.ACTIONS
    file on the server.  The file is located in the 12 hive under Template\1033\workflow.  Your WSS.Actions file contains a reference to a custom action .dll which is not available on the server."
    I opened the WSS.Actions file in notepad, I dont see any line with *.dll in it. Am I missing something?
    #2: Another post says "The solution I discovered was that the server running my SharePoint Services was not up to .NET 3.0.  As soon as I updated to .NET 3.0 everything worked.I had made sure the machine running SharePoint Designer was updated, but
    had missed the SHarePoint Services server."
    The server is already updated to .Net 3.0.
    #3: I went to the %System Drive%\Documents and Settings\Local Settings\ApplicationData\Microsoft\SharePointDesigner.
    Deleted the ProxyAssemblyCache folder but no luck.
    Just checking if any one was able to resolve this issue by following any of the solution other than the above mentioned ones.
    Thanks,
    Cutloo

        I have the similar issue with my custom work flow. I have searched the whole day for the solution but no success, then at last a simple track works for me. Please try this if any one faces such issue.
    Basically the assembly that we have define in the ACTIONS file dose not exists on the server, because of two reasons, either we have given the wrong assembly name (in our case the namespace name inside our solution) or the PublicKeyToken may differ from the
    original assembly, that are deployed in GAC.
        So cross check both of these, in my case the assembly name was fine,
     <Action
        Name="Move Item to Another List and Send Email"
        ClassName="MyAssemblyName.Classname"
        Assembly="MyAssemblyName,Version=1.0.0.0, Culture=neutral, PublicKeyToken=4053d1fde8a1c781"
        AppliesTo="all"
        Category="Email actions">
    But the problem was in the 'PublicKeyToken', so i double click on the feature inside my solution,then in the bottom i have clicked on the manifest tab to check the entries.
    <Feature xmlns="http://schemas.microsoft.com/sharepoint/" Title="MyAssemblyName Feature1" Id="f7f1bda0-5f65-40f1-a705-f6f15a41da3a" ReceiverAssembly="MyAssemblyName, Version=1.0.0.0, Culture=neutral, PublicKeyToken=0c32dbb769ed64b5"
    ReceiverClass="MyAssemblyName.Features.Feature1.Feature1EventReceiver" Scope="WebApplication"></Feature>
    Here i got the actual PublicKeyToken for my assembly (0c32dbb769ed64b5), i have replaced this number inside ACTIONS file, deploy the soultion, reset IIS.
    It works for me,

  • Find list of FACT tables in the cubes

    Hi experts,
      Pls help me to find list of FACT tables in the cube and Dimension table associated with the Fact table. your answer will be very helpful for me.
    Thanks

    hi,
    Go to Analysis Server (SSMS)-> use
    --All Measures
    SELECT [CATALOG_NAME] as [DATABASE],
    CUBE_NAME AS [CUBE],[MEASUREGROUP_NAME] AS [FOLDER],[MEASURE_CAPTION] AS [MEASURE],
    [MEASURE_IS_VISIBLE]
    FROM $SYSTEM.MDSCHEMA_MEASURES
    WHERE CUBE_NAME ='Adventure Works DW2012'
    ORDER BY [MEASUREGROUP_NAME]
    You can use below link ;
    http://bennyaustin.wordpress.com/2011/03/01/ssas-dmv-queries-cube-metadata/
    Thanks

  • Unable to connect FR studio from local desktop to HFR server

    Hi Gurus,
    I have installed HFR on client server and able to connect studio with server.
    When i tried to connect from local desktop to HFR server, I am unable to connect to the HFR server.
    error as " You are not authroized to this functionality, please contact your administrator.
    Hyperion: 11.1.2.1
    database: 11.2.0.2
    changed the ports while configuring.
    for FR given as 8010 and RA framework given as 8020.ports are opened.
    please let me know your suggestions to resolve this. am i missing something?
    Thanks!

    "You Are Not Authorized To Use This Functionality" Error Occurs When Logging On To Financial Reporting Studio From Workstation [ID 1319745.1]
    You are trying to log into the Financial Reporting Studio from with a properly provisioned user ID (including administrator IDs), but you get an error: "You are not authorized for this functionality."
    Cause
    The Financial Reporting (FR) Report Server box has multiple Network Interface Cards (NICs), and the one used by the Report Server is listed second in the binding order.
    When a connection is requested of the FR Server from the FR Studio, the server returns an IP address to the Studio client. The server will, by design, return the first IP listed in the Server Network Interface's bind order. If this first IP is not the one associated with the FR Report Server, the FR Studio login error will result.
    Solution
    1. Review the Microsoft HELP menu on the FR Report Server for information on changing the bind order of the Network Interface Cards.
    2. Change the binding order of the primary NIC on the FR Report Server box so that the FR Report Server IP address is 1st in the bind order.
    3. Reboot the FR Report Server Box.
    Alternately, if it is not necessary to have multiple NICs active on the server, you can disable all but the one used by the FR Report Service.

  • Can ZAM capture local Administrators from client?

    Hi, my first time posting here. My organization uses Zenworks 11 SP1 (ZCM and ZAM). Can ZAM be configured to capture members of the local administrators group off of the client? Our client machines are Windows XP SP3, and local administrators can be found at My Computer-Manage-Local Users and Groups-Groups-Administrators on the client.
    Our client services guys know ZAM much better than I do and they have never been able to find how to do this. I'm writing a custom app that needs requires this data. We have a workaround process in place, but it's a little clunky and it would really be ideal if we had a way to just capture this directly into ZAM since the large majority of the other data I need is already coming from ZAM. Was just wondering if any Zenworks gurus out there could shed a little light. Thank you in advance for any replies.

    Chris,
    It appears that in the past few days you have not received a response to your
    posting. That concerns us, and has triggered this automated reply.
    Has your problem been resolved? If not, you might try one of the following options:
    - Visit http://support.novell.com and search the knowledgebase and/or check all
    the other self support options and support programs available.
    - You could also try posting your message again. Make sure it is posted in the
    correct newsgroup. (http://forums.novell.com)
    Be sure to read the forum FAQ about what to expect in the way of responses:
    http://forums.novell.com/faq.php
    If this is a reply to a duplicate posting, please ignore and accept our apologies
    and rest assured we will issue a stern reprimand to our posting bot.
    Good luck!
    Your Novell Product Support Forums Team
    http://forums.novell.com/

  • VBS: Add domain user and group to local administrators

    I have a piece of VBS code that I have modified that basically adds a specified domain user and group to the PCs local Administrators group. It works on Windows 7, but not on Windows 8 at all.
    Call AddUserToGroup("./Administrators", "myDomain.net/NetworkAdminis")
    Call AddUserToGroup("./Administrators", "myDomain.net/Domain Admins")
    Call addDomainUser("myDomain", "myUserGroup")
    Sub AddUserToGroup(local, domain)
    Dim objLocalGroup
    Dim objDomainGroup
    Dim server
    For Each server in servers
    Set objLocalGroup = GetObject("WinNT://" & local & ",group")
    Set objDomainGroup = GetObject("WinNT://" & domain & ",group")
    With objLocalGroup
    .Add(objDomainGroup.AdsPath)
    .SetInfo
    End With
    Next
    Set objLocalGroup = Nothing
    Set objDomainGroup = Nothing
    End Sub
    Sub addDomainUser(strDomain, strUser)
    Dim strComputer
    Dim objWshNet
    Dim objGroup
    Dim objUser
    Set objWshNet = CreateObject("WScript.Network")
    strComputer = objWshNet.ComputerName
    Set objGroup = GetObject("WinNT://" & strComputer & "/Administrators,group")
    Set objUser = GetObject("WinNT://" & strDomain & "/" & strUser & ",user")
    If Not objGroup.IsMember(objUser.ADsPath) Then
    objGroup.Add (objUser.ADsPath)
    End If
    Set objWshNet = Nothing
    Set objGroup = Nothing
    Set objUser = Nothing
    End Sub
    I have debugged the code line by line using VBA's IDE and there seems to be no error condition firing. It executes all lines, but it is not adding the users and groups as it did with Windows 7 and below. The script is being run as local administrator.

    Hi,
    The first step is to comment out your On Error Resume Next line and try again.
    Don't retire TechNet! -
    (Don't give up yet - 13,225+ strong and growing)

  • Ifs Connection problem from local machine to Ifs server using API

    I am trying to make an API call to connect to Ifs database server running on different machine(UNIX) from local machine. I copied all jar files and /Lib/Ifs/Settings directory to my local machine. All these files are in the classpath of weblogic 6.0 environment. A jsp on weblogic server call a bean which has a responsibibility of connecting to Ifs server to get LibrarySession.
    From Visual Cafe 4.5 everything works fine but when i start weblogic 6.0 outside the visual cafe environment i get the error
    below. I included all the jar files and /Lib/Ifs/Settings in start up script of weblogic server
    Do you know if i missing some thing????
    java.lang.UnsatisfiedLinkError: do_open
    at oracle.jdbc.oci8.OCIDBAccess.do_open(Native Method)
    at oracle.jdbc.oci8.OCIDBAccess.logon(OCIDBAccess.java:309)
    at oracle.jdbc.driver.OracleConnection.(OracleConnection.java:198)
    at oracle.jdbc.driver.OracleDriver.getConnectionInstance(OracleDriver.ja
    va:251)
    at oracle.jdbc.driver.OracleDriver.connect(OracleDriver.java:224)
    at java.sql.DriverManager.getConnection(DriverManager.java:517)
    at java.sql.DriverManager.getConnection(DriverManager.java:177)
    at oracle.ifs.server.LibraryConnection.(LibraryConnection.java:235
    at oracle.ifs.server.ConnectionPool.createLibraryConnection(ConnectionPo
    ol.java:576)
    at oracle.ifs.server.ConnectionPool.(ConnectionPool.java:321)
    at oracle.ifs.server.S_LibraryService.(S_LibraryService.java:912)
    at oracle.ifs.server.S_LibraryService.startService(S_LibraryService.java
    :1129)
    at oracle.ifs.beans.LibraryService.connectLocal(LibraryService.java:408)
    at oracle.ifs.beans.LibraryService.connect(LibraryService.java:280)

    Have you installed the Oracle client software on the machine where you are running WebLogic and your custom iFS application (your bean)?
    It looks like the native JDBC libraries are not available to the JVM where WebLogic is executing your code. iFS uses JDBC to access the Oracle database, and it requires "thick" (OCI8) JDBC to do so. This means that you need Oracle client software to be installed (in an ORACLE_HOME directory) on a computer where you want to use the iFS API.
    If you do have the Oracle client software installed already, then perhaps the WebLogic environment isn't configured to have access to the native JDBC libraries. Normally, as long as $ORACLE_HOME/lib is in the LD_LIBRARY_PATH (on unix) or $ORACLE_HOME/bin is in the PATH (on windows), stuff should just work.
    See if you can find any information about including native libraries (for instance, to use JNI) in the WebLogic documentation. We don't certify with WebLogic, which is why I don't know the answer offhand.

Maybe you are looking for

  • How do I move a compound clip in one event to another event when it is used in a project?

    I've been using FCPX since 10.0.3. The recent upgrade to 10.1 is forcing me to reorganize everything. At some point during the upgrade cycle, Apple decided to store ALL compound clips inside events, automatically, upon creation. I was oblivious to th

  • Removing small objects in drawing

    Hello, I have a quastion regarding the removal of small objects in a drawing. I made with ArcGIS a map of the Netherlands. Because it is a detailed map, it also becomes heavy and my computer slows down. I merged some smll elements together with the p

  • Download problem with photoshop elements

    I'm having difficulty downloading photoshop elements, I get an error message saying 'the identity of the developer cannot be trusted' any help? Thanks in advance

  • Native library problem

    I am trying to get a berkeley xml database working in java and i get an error when i try to run their sample programs. I am trying this in linux right now with problems. I got it to work in windows. I used this command to set the native library path:

  • How to stop the floating AirPlay icon

    I want to get rid of the Airplay icon that floats over my photos while I play music? I am using my photos as the screen saver and has this icon all the time. What setting do I need to change?