简体   繁体   中英

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. 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.

According to my research, when we successfully run the command Get-AzureRmDataLakeStoreItemAclEntry , we will get a DataLakeStoreItemAce class. 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 . 在此处输入图片说明

在此处输入图片说明

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>

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

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

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