如何从不同域获取用户信息

如何从不同域获取用户信息

如何从不同的域获取用户信息。Get-ADUser -Identity 用户名适用于相同的域 1,但我想知道来自不同子域的用户信息

答案1

我输入Get-Help Get-ADUser -Full并发现了以下内容:

-Server <string>
    Specifies the Active Directory Domain Services instance to connect to, by providing one of the following values
     for a corresponding domain name or directory server. The service may be any of the following:  Active Director
    y Lightweight Domain Services, Active Directory Domain Services or Active Directory Snapshot instance.
    Domain name values:
      Fully qualified domain name
        Examples: corp.contoso.com
      NetBIOS name
        Example: CORP

    Directory server values:
      Fully qualified directory server name
        Example: corp-DC12.corp.contoso.com
      NetBIOS name
        Example: corp-DC12
      Fully qualified directory server name and port
        Example: corp-DC12.corp.contoso.com:3268

    The default value for the Server parameter is determined by one of the following methods in the order that they
     are listed:
      -By using Server value from objects passed through the pipeline.
      -By using the server information associated with the Active Directory PowerShell provider drive, when running
     under that drive.
      -By using the domain of the computer running Powershell.

    The following example shows how to specify a full qualified domain name as the parameter value.
      -Server "corp.contoso.com"

    Required?                    false
    Position?                    named
    Default value
    Accept pipeline input?       false
    Accept wildcard characters?  false

这就是你要找的吗?

相关内容