+ Reply to Thread
Results 1 to 2 of 2

#Code [Active Directory Report]

  1. #1
    Registered User
    Join Date
    02-28-2020
    Location
    India
    MS-Off Ver
    2016
    Posts
    36

    Post #Code [Active Directory Report]

    Hi All,
    I got below code when searching on google
    Sub DemoDomainName()
    Set wshNetwork = CreateObject("WScript.Network")
    strUserDomain = wshNetwork.UserDomain
    strCompName = wshNetwork.ComputerName
    MsgBox "User Domain: " & strUserDomain & vbNewLine & "Computer Name: " & strCompName
    End Sub


    this works fine on which ever system we run it give that users info.
    Instead which ever user name i give for that user I need to get the report.

    Or can any one help how to extract all users info for a given AD Group name. I mean which ever active directory group name i pass i want all users details exported to excel for given group.

    TIA
    Last edited by DeepMa1; 04-09-2021 at 02:11 AM.

  2. #2
    Forum Moderator alansidman's Avatar
    Join Date
    02-02-2010
    Location
    Steamboat Springs, CO
    MS-Off Ver
    MS Office 365 insider Version 2506 Win 11
    Posts
    24,761

    Re: Active Directory Report

    Administrative Note:

    Welcome to the forum.

    We would very much like to help you with your query, however you need to include code tags around your code.

    Please take a moment to add the tags. Posting code between [code]Please [url=https://www.excelforum.com/login.php]Login or Register [/url] to view this content.[/code] tags makes your code much easier to read and copy for testing, and it also maintains VBA formatting.

    Please see Forum Rule #2 about code tags and adjust accordingly. Click on Edit to open your post, then highlight your code and click the # icon at the top of your post window. More information about these and other tags can be found here

    (Note: this change is not optional. No help to be offered until this moderation request has been fulfilled.)
    Alan עַם יִשְׂרָאֵל חַי


    Change an Ugly Report with Power Query
    Database Normalization
    Complete Guide to Power Query
    Man's Mind Stretched to New Dimensions Never Returns to Its Original Form

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Similar Threads

  1. [SOLVED] Active Directory Query
    By anthonyme12 in forum Excel General
    Replies: 7
    Last Post: 08-01-2019, 02:09 PM
  2. Need Spreadsheet to Report Active Directory Data in Chart
    By djtech2k in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 01-26-2015, 09:53 PM
  3. Replies: 0
    Last Post: 09-05-2013, 10:00 AM
  4. Active Directory Help
    By Macdave_19 in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 05-26-2011, 07:27 AM
  5. Seach AD (Active Directory) for first name by last name
    By esullivan in forum Excel Programming / VBA / Macros
    Replies: 5
    Last Post: 01-21-2011, 05:42 PM
  6. Get User Name - Active Directory
    By jai2808 in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 08-30-2007, 05:20 AM
  7. Active Directory References? help...
    By Judith in forum Excel General
    Replies: 1
    Last Post: 10-12-2006, 04:14 PM

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1