Get-ADUser命令用于获取活动目录中的用户对象属性列表。可以使用该命令获取用户的姓名、电子邮件地址、电话号码、所属组等信息。以下是一些常用的属性: Name: 用户的姓名 SamAccountName: 用户的登录名 UserPrincipalName: 用户的用户主体名称 EmailAddress: 用户的电子邮件地址 PhoneNumber: 用户的电话号码 Enabled: 用户...
Console.WriteLine(members.DisplayName); } } 二、通过 System.DirectoryServices直接获得ADuser 在DirectoryServices 程序中 我们可以使用DirectorySearcher方法获得AD User. private static void DirectoryConnection() { var directoryEntry = new DirectoryEntry("LDAP://192.168.1.199", "administrator", "Password2"); v...
The Get-ADUser cmdlet gets a user object or performs a search to retrieve multiple user objects.The Identity parameter specifies the Active Directory user to get. You can identify a user by its distinguished name (DN), GUID, security identifier (SID), Security Accounts Manager (SAM) account ...
-Identity $userInstanceDefault Value: **Data Type: ADUserAttributes展開資料表 NameValuePSMAML Attribute Required? true required Variable Length? false variableLength Accept wildcard characters? false globbing Accept Pipeline Input? true (ByValue) pipelineInput Position? 1 positionValue...
Example 2: Get a user by ID PowerShell PS C:\>Get-AzureADUser-ObjectId"testUpn@tenant.com" This command gets the specified user. Example 3: Search among retrieved users PowerShell PS C:\>Get-AzureADUser-SearchString"New"ObjectId DisplayName UserPrincipalName UserType --- --- --- --...
51CTO博客已为您找到关于get-aduser用法的相关内容,包含IT学习相关文档代码介绍、相关教程视频课程,以及get-aduser用法问答内容。更多get-aduser用法相关解答可以来51CTO博客参与分享和学习,帮助广大IT技术人实现成长和进步。
-UserPrincipalName user principal name Type:String Aliases:UPN Position:Named Default value:None Required:True Accept pipeline input:False Accept wildcard characters:False Outputs IMicrosoftGraphUser 在GitHub 上与我们协作 可以在 GitHub 上找到此内容的源,还可以在其中创建和查看问题和拉取请求。 有关详细...
Get-CsAdUser -Filter {Enabled -ne $True} | Select-Object DisplayName In Example 4, all the users who have not been enabled for Skype for Business Server are returned. To do this, the Filter parameter is used with the Get-CsAdUser cmdlet to restrict the returned data to user accounts wh...
Get-ADUser -Identity Abbey.Crawford -Properties * | Select Name,mail |ft Displaying User Principal Name (UPN) To retrieve a user’s UPN, use this cmdlet: Get-ADUser -Identity Abbey.Crawford -Properties * | Select Name,userprincipalname |ft ...
PS C:\> Get-ADUser -Identity ChewDavid -Properties * Surname : David Name : Chew David UserPrincipalName : GivenName : David Enabled : False SamAccountName : ChewDavid ObjectClass : user SID : S-1-5-21-2889043008-4136710315-2444824263-3544 ObjectGUID : e1418d64-096c-4cb0-b903-ebb6656...