[英]VBS script to retrieve user information from Azure Active Directory
This may not even be possible without powershell (or Azure Powershell), but can I use a script to retrieve user information from AZURE active directory on a Windows 10 computer?如果没有 powershell(或 Azure Powershell),这甚至可能无法实现,但是我可以使用脚本从 Windows 10 计算机上的 AZURE 活动目录中检索用户信息吗? Since the user has already provided credentials and the user name has been pulled down from Azure, is there any other information pulled down that I can reference as a system object (for eg).
由于用户已经提供了凭据并且用户名已从 Azure 下拉,是否还有其他任何下拉信息可以作为系统对象引用(例如)。 Example of code to show user name:
显示用户名的代码示例:
Set objSysInfo = CreateObject("ADSystemInfo") Set objSysInfo = CreateObject("ADSystemInfo")
wScript.Echo objSysInfo.UserName wScript.Echo objSysInfo.UserName
I want to see other information such as users department(ie .department , so that I can map drives by identifying the users department rather than using the user name).我想查看其他信息,例如用户部门(即 .department ,以便我可以通过标识用户部门而不是使用用户名来映射驱动器)。
If I can't use vbs then is this possible with Azure powershell without re-entering user credentials and/or re-verifying user credentials?如果我不能使用 vbs,那么在不重新输入用户凭据和/或重新验证用户凭据的情况下,Azure powershell 是否可以实现?
It's possible with Azure PowerShell commandlets:可以使用 Azure PowerShell commandlet:
Connect-MsolService -CurrentCredential
Get-MsolUser -UserPrincipalName username@domain
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.