Jump to content
Welcome to our new Citrix community!
  • 1

Getting Application server name and DG name by feeding application name .


Nishant kapil

Question

Hi @James kindon

This is regarding script you mention at below link :

https://discussions.citrix.com/topic/399858-published-application-with-in-delivery-groups-powershell-command-for-xenapp715/

I love your script , can you help me identifying application server name in separate txt file (made some changes to get this info) ? I am able to get the application server information in array format. But I need application server information is one separate file , because by taking these server name as input i need to fetch various other details like RAM and CPU on all these server.

Scenario  1) Need to identify the resources on Xenapp server (specific to few apps only ,not all app)

                      2) We only have application name and need to run script to other customer infra.

                       3) also if possible , how can we control the output for specific app (like 3-4 apps only) and not all.

 

Below is the script with little changes as highlighted:

 

asnp citrix*
$DeliveryGroups = Get-BrokerDesktop
$Applications = Get-BrokerApplication

$AppList = @()

foreach ($App in $Applications) {
    foreach ($DG in $DeliveryGroups) {
        if ($App.AssociatedDesktopGroupUids -match $DG.DesktopGroupUid) {
            $Report = New-Object -TypeName psobject
            $Report | Add-Member -MemberType NoteProperty -Name ApplicationName -Value $App.Name
            $Report | Add-Member -MemberType NoteProperty -Name DeliveryGroupName -Value $DG.DesktopGroupName
        $Report | Add-Member -MemberType NoteProperty -Name ApplicationServerName -Value $DG.DNSName
            $AppList += $Report
        }
    }
}

$AppList

 

Result:

image.thumb.png.d48c30d863fc833e90e169eca017dcba.png

 

 

 

Link to comment

1 answer to this question

Recommended Posts

  • 0

Apps aren't tied to a server unless you use tagging, which is a whole looping process to filter through.

 

To get your list of servers, you would need to loop through the Delivery Groups that match the app assignments, and then output from there, if you use app groups, its another set of loops and matches

 

You can filter your output (and input) by customising the $Application variable (for input), or the $AppList is just an output array, so you can filter that also once created

 

Link to comment

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...