English 中文(简体)
缩略语
原标题:Display AD members from mutiple groups under an OU

我需要一些帮助,从团结组织下的多个团体中展示出反倾销成员。 希望得到任何帮助。

我有以下简称信息技术小组,而部门小组则包括地点团体和成员团体。

IT(OU)

-Dev -Toronto -Member

-Tech -Toronto -Member

-Resource -Toronto -Member

-Software -Toronto -Member

我需要用文字给我一个像上述例子一样的所有团体和成员的名单。 但是,迄今为止,我只能够找到下面这样的部门团体的名单。

IT(OU)

-Dev -Toronto

-Tech -Toronto

-Resource -Toronto

-Software -Toronto

这是我一直在尝试的,它只给我这个没有成员团体的部会。

我需要为成员群体提供另一种机会,但不能确保到哪里去。

Get-ADobject -Filter * -SearchBase "OU=it,ou=Department,DC=test,dc=global,dc=com" | sort-object name |
    ForEach-Object {
        $filter =  (memberof={0})  -f $_.distinguishedname
        foreach($obj in Get-ADObject -LDAPFilter $filter -Properties * ) {
            [PSCustomObject]@{
                "Name"= $_.Name
        "User/Group"= $obj.objectclass
        "User Name"= $obj.SamAccountName
                "Employee Type" = $obj.employeetype
        "Office location" = $obj.CanonicalName
        "GIGA 1" = $obj."IGA-Attribute1"
        "GIGA 2" = $obj."IGA-Attribute2"
        "GIGA 3" = $obj."IGA-Attribute3"
        "GIGA 4" = $obj."IGA-Attribute4"
          }
       }
    }        | Export-CSV C:IT_$((Get-Date).ToString("yyyy-MM-dd")).csv -NoTypeInformation

感谢你们的时间和帮助。

问题回答

暂无回答




相关问题
Using JavaScript to get an LDAP multi-valued string attribute

I am trying to retrieve an object attribute in Active Directory that appears to be a multi-valued string (See canonicalName). After performing a search: var conn; conn.Open = Provider=ADsDSOObject; ...

Test "User Must Change Password" field in .Net 3.5

I m trying to perform some basic AD User managment tasks in C# using .Net 3.5 I ve got a System.DirectoryServices.AccountManagement.UserPrincipal object that contains the user details. I can call ...

SSIS Script Task connecting to AD

I have written a SSIS 2005 script task that connects to Active Directory and reads user accountnames to store in database. I was able to successfully test this on my local system by executing dtexec....

Update Full Name in Active Directory

I ve been thrust into the deep end with Active Directory (I m a web developer, go fig) I have a user that I ve changed first/last name on but the Full Name hasn t changed which is causing issues with ...

Authenticate against Active Directory/ISA from php [closed]

I have a complicated problem, exacerbated by the fact I don t really know where to start! Over the last few years, I ve developed a number of php web-based systems. When I built them, our network was ...

热门标签