Quantcast
Channel: PowerShell.com – PowerShell Scripts, Tips, Forums, and Resources
Viewing all articles
Browse latest Browse all 6937

Get-acl output to pipe to get-qadgroup

$
0
0

Hi Guys.  Here's my outline of the problem I'm facing... I'm really new to coding.

Objective: users inputs share path,  script filtersout inherited groups, shows group names, then pipe those group names into get-qadgroup to show owner and other info.

Problem: I can't pipe the result of get-acl into get-qadgroup.

The result of get-acl puts is a column under access variable called  "IdentityReference" - this has the names of the groups providing access to the share but get-qadgroup only accepts an object and I get failure:

Get-QADGroup : Cannot convert 'System.Object[]' to the type 'Quest.ActiveRoles.ArsPowerShellSnapIn.Data.IdentityParamet
er' required by parameter 'Identity'. Specified method is not supported.

 

My Script:

$groups

 

 

 

=get-acl$path | select-expandpropertyaccess |where {$_.IsInherited -notcontains"True"} | where {($_.IdentityReference -notlike"*BUILTIN*") -and ($_.IdentityReference -notlike"*NT AUTHORITY*") -and ($_.IdentityReference -notlike"*CREATOR*")} | SelectIdentityReference |Get-qadgroup

##Pipe to get-qadgroup to get group information.


Viewing all articles
Browse latest Browse all 6937

Latest Images

Trending Articles



Latest Images