简体   繁体   English

如何获取使用Power Shell访问Azure数据湖存储的用户列表

[英]How to get the list of users accessing the Azure data lake store with power shell

I am trying to get a number of users are accessing my data lake with the power shell script, I tried with the below code but it's giving the ID of the users but I want their names also. 我试图让许多用户使用Power Shell脚本访问我的数据湖,我尝试使用以下代码,但是它给出了用户ID,但我也想要他们的名字。 Please help with that. 请帮忙。

Get-AzureRmDataLakeStoreItemAclEntry -Account 'mylake' -Path '/'

Getting the results like below, so I want the name also with the user id, if not possible need Name and access details like user or Group and type of access they have. 得到如下所示的结果,因此我希望名称也带有用户ID,如果不可能的话,还需要名称和访问详细信息,例如用户或组以及他们具有的访问类型。

According to my research, when we successfully run the command Get-AzureRmDataLakeStoreItemAclEntry , we will get a DataLakeStoreItemAce class. 根据我的研究,当我们成功运行命令Get-AzureRmDataLakeStoreItemAclEntry ,我们将获得一个DataLakeStoreItemAce类。 The class does not have a property to indicate the user or group name. 该类没有指示用户或组名的属性。 For more details, please refer to https://docs.microsoft.com/en-us/dotnet/api/microsoft.azure.commands.datalakestore.models.datalakestoreitemace?view=azurerm-ps . 有关更多详细信息,请参阅https://docs.microsoft.com/zh-cn/dotnet/api/microsoft.azure.commands.datalakestore.models.datalakestoreitemace?view=azurerm-ps 在此处输入图片说明

在此处输入图片说明

So if you want to get the user or group name, we need to run other commands to get it. 因此,如果要获取用户名或组名,我们需要运行其他命令来获取它。 For example 例如

# get user name 
Get-AzureRmADUser -ObjectId < the id you get>

#get group name
Get-AzureRmADGroup -ObjectId <the id you get>

在此处输入图片说明 在此处输入图片说明

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM