[THIN] Re: easy way to list all applications and users permissions

  • From: "Jason Benway" <benwayj@xxxxxxxxxxx>
  • To: <thin@xxxxxxxxxxxxx>
  • Date: Thu, 3 Jun 2010 10:35:30 -0400

I edited the line

$farm = new-object -com metaframecom.metaframefarm

To

$farm = new-object -com mycitrixservername

 

And get output like 

 

-- USER: \

-- GROUP: \

 

From: thin-bounce@xxxxxxxxxxxxx [mailto:thin-bounce@xxxxxxxxxxxxx] On
Behalf Of Durbin, Jeff
Sent: Thursday, June 03, 2010 9:51 AM
To: thin@xxxxxxxxxxxxx
Subject: [THIN] Re: easy way to list all applications and users
permissions

 

Here's a quick PowerShell script I wrote that will create a CSV file.
The output format is one line for each combination of app/group or
app/user, so if you open the output file in Excel and turn on
autofilter, you can select an app from the drop down and see all users
and groups to which the app is published, or select a user or group and
see all apps that are published to that user or group. 

 

$outfile = ".\PubAppsUsersAndGroups.csv"

if (test-path $outfile) {remove-item $outfile}

add-content $outfile "AppDN,UserOrGroup,Name"

$farm = new-object -com metaframecom.metaframefarm

$farm.initialize(1)

foreach ($app in $farm.applications) 

{

  $app.loaddata(1)

  $appdn = $app.distinguishedname

  write-host $appdn

  foreach ($user in $app.users)

  {

    $user = $user.aaname + "\" + $user.username

    write-host ("-- USER: " + $user)

    add-content $outfile ($appdn + ",user," + $user)   

  }  

  foreach ($group in $app.groups)

  {

    $group = $group.aaname + "\" + $group.groupname

    write-host ("-- GROUP: " + $group)

    add-content $outfile ($appdn + ",group," + $group)

  }  

}

 

________________________________

From: thin-bounce@xxxxxxxxxxxxx [mailto:thin-bounce@xxxxxxxxxxxxx] On
Behalf Of Hutchinson, Alan
Sent: Thursday, June 03, 2010 5:16 AM
To: thin@xxxxxxxxxxxxx
Subject: [THIN] Re: easy way to list all applications and users
permissions

 

Thomas Koetzing has some vb scripts that may do what you're after, in
particular appsusers.wsf although you may need to download the entire
resource kit (4GEReskit) to get at them. http://www.thomaskoetzing.de

 

Regards,

 

Alan.

 

________________________________

From: thin-bounce@xxxxxxxxxxxxx [mailto:thin-bounce@xxxxxxxxxxxxx] On
Behalf Of Jason Benway
Sent: 27 May 2010 16:45
To: thin@xxxxxxxxxxxxx
Subject: [THIN] easy way to list all applications and users permissions

I'm still running PS 4 on Windows 2003. Is there a script or tool I can
run to get a list of all the applications w/ which users/groups have
access?

 

Thanks,jb


This e-mail, including attachments, may include confidential and/or
proprietary information, and may be used only by the person or entity
to which it is addressed. If the reader of this e-mail is not the
intended
recipient or his or her authorized agent, the reader is hereby notified
that any dissemination, distribution or copying of this e-mail is
prohibited. If you have received this e-mail in error, please notify the
sender by replying to this message and delete this e-mail immediately.

Other related posts: