Script to list Citrix XenApp 6.5 published application and Citrix servers it is hosted

Hello there,

We have Citrix XenApp 65 farm with around 400 published applications and need to know if there is a script that we can run to list Published apps and the Citrix servers it is hosted on.

Please advise.

Thanks and Regards
goprasadAsked:
Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

Carl WebsterCommented:
sure, my updated documentation script can do that.

http://carlwebster.com/xenapp-6-5-windows-server-2008-r2-documentation-script-version-4-2-released/

.\xa65_inventory_v42.ps1 -section apps
0
Vijaya Reddy Pinnapa ReddyCommented:
Add-PSSnapin Citrix*
$stream = [System.IO.StreamWriter] "C:\Scripts\serversapp.txt"
$stream.writeline("====================")
$stream.writeline("Aplication, Server")
$stream.writeline("====================")
$server = Get-XAServer
$totalservidores = 0
foreach($servidor in $server){
$totalservidores = $totalservidores + 1
}
$applications = Get-XAApplication
foreach($application in $applications){
$server = Get-XAServer -BrowserName $application.DisplayName
$contadorservidores = 0
foreach ($servidor in $server){
$contadorservidores = $contadorservidores + 1
$output=$application.DisplayName ", " $servidor.ServerName
$stream.writeline($output)
}
$output = "Total servers publishing the application " $application.DisplayName + ": " + $contadorservidores + " of " $totalservidores
$stream.writeline($output)
$output = "===================="
$stream.writeline($output)
}

$stream.close()

==============

Also check this article,
http://www.czerno.com/default.asp?inc=/html/citrix/scripts/PubAppReportexcelPS.asp
0
goprasadAuthor Commented:
Thanks Carl. Please let me know from where within the site can I download the script?
0
Ultimate Tool Kit for Technology Solution Provider

Broken down into practical pointers and step-by-step instructions, the IT Service Excellence Tool Kit delivers expert advice for technology solution providers. Get your free copy now.

Carl WebsterCommented:
The link is at the bootom of the article and if you ho to carlwebster.com, the top article is a link to every script.
0
goprasadAuthor Commented:
@Elchuru,

When I executed your script I got the following error: Please advise.

Unexpected token ', ' in expression or statement.
At line:10 char:38
+ $output=$application.DisplayName ", " <<<<  $servidor.ServerName
    + CategoryInfo          : ParserError: (, :String) [], ParentContainsErrorRecordException
    + FullyQualifiedErrorId : UnexpectedToken
0
Vijaya Reddy Pinnapa ReddyCommented:
Please run this script, the error because of concatenation missed out. Now check

Add-PSSnapin Citrix*
$stream = [System.IO.StreamWriter] "C:\Scripts\serversapp.txt"
$stream.writeline("====================")
$stream.writeline("Aplication, Server")
$stream.writeline("====================")
$server = Get-XAServer
$totalservidores = 0
foreach($servidor in $server){
$totalservidores = $totalservidores + 1
}
$applications = Get-XAApplication
foreach($application in $applications){
$server = Get-XAServer -BrowserName $application.DisplayName
$contadorservidores = 0
foreach ($servidor in $server){
$contadorservidores = $contadorservidores + 1

$output=$application.DisplayName + ", " + $servidor.ServerName

$stream.writeline($output)
}
$output = "Total servers publishing the application " $application.DisplayName + ": " + $contadorservidores + " of " $totalservidores
$stream.writeline($output)
$output = "===================="
$stream.writeline($output)
}

$stream.close()
0
goprasadAuthor Commented:
When I re-run the above, I am getting the following error msg: Please advise.

Unexpected token 'application' in expression or statement.
At line:13 char:67
+ $output = "Total servers publishing the application " $application <<<< .DisplayName + ": " + $contadorservidores + "
 of " $totalservidores
    + CategoryInfo          : ParserError: (application:String) [], ParentContainsErrorRecordException
    + FullyQualifiedErrorId : UnexpectedToken
0
Vijaya Reddy Pinnapa ReddyCommented:
I have modified script. Check below script

Add-PSSnapin Citrix*
$stream = [System.IO.StreamWriter] "C:\Scripts\serversapp.txt"
$stream.writeline("====================")
$stream.writeline("Aplication, Server")
$stream.writeline("====================")
$server = Get-XAServer
$totalservidores = 0
foreach($servidor in $server){
$totalservidores = $totalservidores + 1
}
$applications = Get-XAApplication
foreach($application in $applications){
$server = Get-XAServer -BrowserName $application.DisplayName
$contadorservidores = 0
foreach ($servidor in $server){
$contadorservidores = $contadorservidores + 1
$Output=$Application.DisplayName + ", " + $Servidor.ServerName

$stream.writeline($output)
}
$output = "Total servers publishing the application " + $application.DisplayName + ": " + $contadorservidores + " of " + $totalservidores
$stream.writeline($output)
$output = "===================="
$stream.writeline($output)
}

$stream.close()
0

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
goprasadAuthor Commented:
Sorry when I re-run still getting  the following error msg:

You cannot call a method on a null-valued expression.
At line:11 char:18
 $stream.writeline <<<< ($output)
   + CategoryInfo          : InvalidOperation: (writeline:String) [], RuntimeException
   + FullyQualifiedErrorId : InvokeMethodOnNull

ou cannot call a method on a null-valued expression.
t line:14 char:18
 $stream.writeline <<<< ($output)
   + CategoryInfo          : InvalidOperation: (writeline:String) [], RuntimeException
   + FullyQualifiedErrorId : InvokeMethodOnNull

ou cannot call a method on a null-valued expression.
t line:16 char:18
 $stream.writeline <<<< ($output)
   + CategoryInfo          : InvalidOperation: (writeline:String) [], RuntimeException
   + FullyQualifiedErrorId : InvokeMethodOnNull

ou cannot call a method on a null-valued expression.
t line:11 char:18
 $stream.writeline <<<< ($output)
   + CategoryInfo          : InvalidOperation: (writeline:String) [], RuntimeException
   + FullyQualifiedErrorId : InvokeMethodOnNull

ou cannot call a method on a null-valued expression.
t line:11 char:18
 $stream.writeline <<<< ($output)
   + CategoryInfo          : InvalidOperation: (writeline:String) [], RuntimeException
   + FullyQualifiedErrorId : InvokeMethodOnNull

ou cannot call a method on a null-valued expression.
t line:14 char:18
 $stream.writeline <<<< ($output)
   + CategoryInfo          : InvalidOperation: (writeline:String) [], RuntimeException
   + FullyQualifiedErrorId : InvokeMethodOnNull

ou cannot call a method on a null-valued expression.
t line:16 char:18
 $stream.writeline <<<< ($output)
   + CategoryInfo          : InvalidOperation: (writeline:String) [], RuntimeException
   + FullyQualifiedErrorId : InvokeMethodOnNull

ou cannot call a method on a null-valued expression.
t line:11 char:18
 $stream.writeline <<<< ($output)
   + CategoryInfo          : InvalidOperation: (writeline:String) [], RuntimeException
   + FullyQualifiedErrorId : InvokeMethodOnNull

ou cannot call a method on a null-valued expression.
t line:14 char:18
 $stream.writeline <<<< ($output)
   + CategoryInfo          : InvalidOperation: (writeline:String) [], RuntimeException
   + FullyQualifiedErrorId : InvokeMethodOnNull

ou cannot call a method on a null-valued expression.
t line:16 char:18
 $stream.writeline <<<< ($output)
   + CategoryInfo          : InvalidOperation: (writeline:String) [], RuntimeException
   + FullyQualifiedErrorId : InvokeMethodOnNull

ou cannot call a method on a null-valued expression.
t line:11 char:18
 $stream.writeline <<<< ($output)
   + CategoryInfo          : InvalidOperation: (writeline:String) [], RuntimeException
   + FullyQualifiedErrorId : InvokeMethodOnNull

ou cannot call a method on a null-valued expression.
t line:14 char:18
 $stream.writeline <<<< ($output)
   + CategoryInfo          : InvalidOperation: (writeline:String) [], RuntimeException
   + FullyQualifiedErrorId : InvokeMethodOnNull

ou cannot call a method on a null-valued expression.
t line:16 char:18
 $stream.writeline <<<< ($output)
   + CategoryInfo          : InvalidOperation: (writeline:String) [], RuntimeException
   + FullyQualifiedErrorId : InvokeMethodOnNull

ou cannot call a method on a null-valued expression.
t line:11 char:18
 $stream.writeline <<<< ($output)
   + CategoryInfo          : InvalidOperation: (writeline:String) [], RuntimeException
   + FullyQualifiedErrorId : InvokeMethodOnNull

ou cannot call a method on a null-valued expression.
t line:14 char:18
 $stream.writeline <<<< ($output)
   + CategoryInfo          : InvalidOperation: (writeline:String) [], RuntimeException
   + FullyQualifiedErrorId : InvokeMethodOnNull

ou cannot call a method on a null-valued expression.
t line:16 char:18
 $stream.writeline <<<< ($output)
   + CategoryInfo          : InvalidOperation: (writeline:String) [], RuntimeException
   + FullyQualifiedErrorId : InvokeMethodOnNull

ou cannot call a method on a null-valued expression.
t line:11 char:18
 $stream.writeline <<<< ($output)
   + CategoryInfo          : InvalidOperation: (writeline:String) [], RuntimeException
   + FullyQualifiedErrorId : InvokeMethodOnNull

ou cannot call a method on a null-valued expression.
t line:14 char:18
 $stream.writeline <<<< ($output)
   + CategoryInfo          : InvalidOperation: (writeline:String) [], RuntimeException
   + FullyQualifiedErrorId : InvokeMethodOnNull

ou cannot call a method on a null-valued expression.
t line:16 char:18
 $stream.writeline <<<< ($output)
   + CategoryInfo          : InvalidOperation: (writeline:String) [], RuntimeException
   + FullyQualifiedErrorId : InvokeMethodOnNull

ou cannot call a method on a null-valued expression.
t line:11 char:18
 $stream.writeline <<<< ($output)
   + CategoryInfo          : InvalidOperation: (writeline:String) [], RuntimeException
   + FullyQualifiedErrorId : InvokeMethodOnNull

ou cannot call a method on a null-valued expression.
t line:14 char:18
 $stream.writeline <<<< ($output)
   + CategoryInfo          : InvalidOperation: (writeline:String) [], RuntimeException
   + FullyQualifiedErrorId : InvokeMethodOnNull

ou cannot call a method on a null-valued expression.
t line:16 char:18
 $stream.writeline <<<< ($output)
   + CategoryInfo          : InvalidOperation: (writeline:String) [], RuntimeException
   + FullyQualifiedErrorId : InvokeMethodOnNull

ou cannot call a method on a null-valued expression.
t line:11 char:18
 $stream.writeline <<<< ($output)
   + CategoryInfo          : InvalidOperation: (writeline:String) [], RuntimeException
   + FullyQualifiedErrorId : InvokeMethodOnNull

ou cannot call a method on a null-valued expression.
t line:14 char:18
 $stream.writeline <<<< ($output)
   + CategoryInfo          : InvalidOperation: (writeline:String) [], RuntimeException
   + FullyQualifiedErrorId : InvokeMethodOnNull

ou cannot call a method on a null-valued expression.
t line:16 char:18
 $stream.writeline <<<< ($output)
   + CategoryInfo          : InvalidOperation: (writeline:String) [], RuntimeException
   + FullyQualifiedErrorId : InvokeMethodOnNull

ou cannot call a method on a null-valued expression.
t line:11 char:18
 $stream.writeline <<<< ($output)
   + CategoryInfo          : InvalidOperation: (writeline:String) [], RuntimeException
   + FullyQualifiedErrorId : InvokeMethodOnNull

ou cannot call a method on a null-valued expression.
t line:14 char:18
 $stream.writeline <<<< ($output)
   + CategoryInfo          : InvalidOperation: (writeline:String) [], RuntimeException
   + FullyQualifiedErrorId : InvokeMethodOnNull

ou cannot call a method on a null-valued expression.
t line:16 char:18
 $stream.writeline <<<< ($output)
   + CategoryInfo          : InvalidOperation: (writeline:String) [], RuntimeException
   + FullyQualifiedErrorId : InvokeMethodOnNull

ou cannot call a method on a null-valued expression.
t line:11 char:18
 $stream.writeline <<<< ($output)
   + CategoryInfo          : InvalidOperation: (writeline:String) [], RuntimeException
   + FullyQualifiedErrorId : InvokeMethodOnNull

ou cannot call a method on a null-valued expression.
t line:14 char:18
 $stream.writeline <<<< ($output)
   + CategoryInfo          : InvalidOperation: (writeline:String) [], RuntimeException
   + FullyQualifiedErrorId : InvokeMethodOnNull

ou cannot call a method on a null-valued expression.
t line:16 char:18
 $stream.writeline <<<< ($output)
   + CategoryInfo          : InvalidOperation: (writeline:String) [], RuntimeException
   + FullyQualifiedErrorId : InvokeMethodOnNull

ou cannot call a method on a null-valued expression.
t line:11 char:18
 $stream.writeline <<<< ($output)
   + CategoryInfo          : InvalidOperation: (writeline:String) [], RuntimeException
   + FullyQualifiedErrorId : InvokeMethodOnNull

ou cannot call a method on a null-valued expression.
t line:11 char:18
 $stream.writeline <<<< ($output)
   + CategoryInfo          : InvalidOperation: (writeline:String) [], RuntimeException
   + FullyQualifiedErrorId : InvokeMethodOnNull

ou cannot call a method on a null-valued expression.
t line:14 char:18
 $stream.writeline <<<< ($output)
   + CategoryInfo          : InvalidOperation: (writeline:String) [], RuntimeException
   + FullyQualifiedErrorId : InvokeMethodOnNull

ou cannot call a method on a null-valued expression.
t line:16 char:18
 $stream.writeline <<<< ($output)
   + CategoryInfo          : InvalidOperation: (writeline:String) [], RuntimeException
   + FullyQualifiedErrorId : InvokeMethodOnNull

ou cannot call a method on a null-valued expression.
t line:11 char:18
 $stream.writeline <<<< ($output)
   + CategoryInfo          : InvalidOperation: (writeline:String) [], RuntimeException
   + FullyQualifiedErrorId : InvokeMethodOnNull

ou cannot call a method on a null-valued expression.
t line:14 char:18
 $stream.writeline <<<< ($output)
   + CategoryInfo          : InvalidOperation: (writeline:String) [], RuntimeException
   + FullyQualifiedErrorId : InvokeMethodOnNull

ou cannot call a method on a null-valued expression.
t line:16 char:18
 $stream.writeline <<<< ($output)
   + CategoryInfo          : InvalidOperation: (writeline:String) [], RuntimeException
   + FullyQualifiedErrorId : InvokeMethodOnNull

ou cannot call a method on a null-valued expression.
t line:11 char:18
 $stream.writeline <<<< ($output)
   + CategoryInfo          : InvalidOperation: (writeline:String) [], RuntimeException
   + FullyQualifiedErrorId : InvokeMethodOnNull

ou cannot call a method on a null-valued expression.
t line:11 char:18
 $stream.writeline <<<< ($output)
   + CategoryInfo          : InvalidOperation: (writeline:String) [], RuntimeException
   + FullyQualifiedErrorId : InvokeMethodOnNull

ou cannot call a method on a null-valued expression.
t line:14 char:18
 $stream.writeline <<<< ($output)
   + CategoryInfo          : InvalidOperation: (writeline:String) [], RuntimeException
   + FullyQualifiedErrorId : InvokeMethodOnNull

ou cannot call a method on a null-valued expression.
t line:16 char:18
 $stream.writeline <<<< ($output)
   + CategoryInfo          : InvalidOperation: (writeline:String) [], RuntimeException
   + FullyQualifiedErrorId : InvokeMethodOnNull

ou cannot call a method on a null-valued expression.
t line:11 char:18
 $stream.writeline <<<< ($output)
   + CategoryInfo          : InvalidOperation: (writeline:String) [], RuntimeException
   + FullyQualifiedErrorId : InvokeMethodOnNull

ou cannot call a method on a null-valued expression.
t line:14 char:18
 $stream.writeline <<<< ($output)
   + CategoryInfo          : InvalidOperation: (writeline:String) [], RuntimeException
   + FullyQualifiedErrorId : InvokeMethodOnNull

ou cannot call a method on a null-valued expression.
t line:16 char:18
 $stream.writeline <<<< ($output)
   + CategoryInfo          : InvalidOperation: (writeline:String) [], RuntimeException
   + FullyQualifiedErrorId : InvokeMethodOnNull

ou cannot call a method on a null-valued expression.
t line:11 char:18
 $stream.writeline <<<< ($output)
   + CategoryInfo          : InvalidOperation: (writeline:String) [], RuntimeException
   + FullyQualifiedErrorId : InvokeMethodOnNull

ou cannot call a method on a null-valued expression.
t line:14 char:18
 $stream.writeline <<<< ($output)
   + CategoryInfo          : InvalidOperation: (writeline:String) [], RuntimeException
   + FullyQualifiedErrorId : InvokeMethodOnNull

ou cannot call a method on a null-valued expression.
t line:16 char:18
 $stream.writeline <<<< ($output)
   + CategoryInfo          : InvalidOperation: (writeline:String) [], RuntimeException
   + FullyQualifiedErrorId : InvokeMethodOnNull

ou cannot call a method on a null-valued expression.
t line:11 char:18
 $stream.writeline <<<< ($output)
   + CategoryInfo          : InvalidOperation: (writeline:String) [], RuntimeException
   + FullyQualifiedErrorId : InvokeMethodOnNull

ou cannot call a method on a null-valued expression.
t line:14 char:18
 $stream.writeline <<<< ($output)
   + CategoryInfo          : InvalidOperation: (writeline:String) [], RuntimeException
   + FullyQualifiedErrorId : InvokeMethodOnNull

ou cannot call a method on a null-valued expression.
t line:16 char:18
 $stream.writeline <<<< ($output)
   + CategoryInfo          : InvalidOperation: (writeline:String) [], RuntimeException
   + FullyQualifiedErrorId : InvokeMethodOnNull

ou cannot call a method on a null-valued expression.
t line:11 char:18
 $stream.writeline <<<< ($output)
   + CategoryInfo          : InvalidOperation: (writeline:String) [], RuntimeException
   + FullyQualifiedErrorId : InvokeMethodOnNull

ou cannot call a method on a null-valued expression.
t line:14 char:18
 $stream.writeline <<<< ($output)
   + CategoryInfo          : InvalidOperation: (writeline:String) [], RuntimeException
   + FullyQualifiedErrorId : InvokeMethodOnNull

ou cannot call a method on a null-valued expression.
t line:16 char:18
 $stream.writeline <<<< ($output)
   + CategoryInfo          : InvalidOperation: (writeline:String) [], RuntimeException
   + FullyQualifiedErrorId : InvokeMethodOnNull

ou cannot call a method on a null-valued expression.
t line:11 char:18
 $stream.writeline <<<< ($output)
   + CategoryInfo          : InvalidOperation: (writeline:String) [], RuntimeException
   + FullyQualifiedErrorId : InvokeMethodOnNull

ou cannot call a method on a null-valued expression.
t line:11 char:18
 $stream.writeline <<<< ($output)
   + CategoryInfo          : InvalidOperation: (writeline:String) [], RuntimeException
   + FullyQualifiedErrorId : InvokeMethodOnNull

ou cannot call a method on a null-valued expression.
t line:14 char:18
 $stream.writeline <<<< ($output)
   + CategoryInfo          : InvalidOperation: (writeline:String) [], RuntimeException
   + FullyQualifiedErrorId : InvokeMethodOnNull

ou cannot call a method on a null-valued expression.
t line:16 char:18
 $stream.writeline <<<< ($output)
   + CategoryInfo          : InvalidOperation: (writeline:String) [], RuntimeException
   + FullyQualifiedErrorId : InvokeMethodOnNull

ou cannot call a method on a null-valued expression.
t line:11 char:18
 $stream.writeline <<<< ($output)
   + CategoryInfo          : InvalidOperation: (writeline:String) [], RuntimeException
   + FullyQualifiedErrorId : InvokeMethodOnNull

ou cannot call a method on a null-valued expression.
t line:14 char:18
 $stream.writeline <<<< ($output)
   + CategoryInfo          : InvalidOperation: (writeline:String) [], RuntimeException
   + FullyQualifiedErrorId : InvokeMethodOnNull

ou cannot call a method on a null-valued expression.
t line:16 char:18
 $stream.writeline <<<< ($output)
   + CategoryInfo          : InvalidOperation: (writeline:String) [], RuntimeException
   + FullyQualifiedErrorId : InvokeMethodOnNull

ou cannot call a method on a null-valued expression.
t line:11 char:18
 $stream.writeline <<<< ($output)
   + CategoryInfo          : InvalidOperation: (writeline:String) [], RuntimeException
   + FullyQualifiedErrorId : InvokeMethodOnNull

ou cannot call a method on a null-valued expression.
t line:14 char:18
 $stream.writeline <<<< ($output)
   + CategoryInfo          : InvalidOperation: (writeline:String) [], RuntimeException
   + FullyQualifiedErrorId : InvokeMethodOnNull

ou cannot call a method on a null-valued expression.
t line:16 char:18
 $stream.writeline <<<< ($output)
   + CategoryInfo          : InvalidOperation: (writeline:String) [], RuntimeException
   + FullyQualifiedErrorId : InvokeMethodOnNull

ou cannot call a method on a null-valued expression.
t line:11 char:18
 $stream.writeline <<<< ($output)
   + CategoryInfo          : InvalidOperation: (writeline:String) [], RuntimeException
   + FullyQualifiedErrorId : InvokeMethodOnNull

ou cannot call a method on a null-valued expression.
t line:14 char:18
 $stream.writeline <<<< ($output)
   + CategoryInfo          : InvalidOperation: (writeline:String) [], RuntimeException
   + FullyQualifiedErrorId : InvokeMethodOnNull

ou cannot call a method on a null-valued expression.
t line:16 char:18
 $stream.writeline <<<< ($output)
   + CategoryInfo          : InvalidOperation: (writeline:String) [], RuntimeException
   + FullyQualifiedErrorId : InvokeMethodOnNull

ou cannot call a method on a null-valued expression.
t line:11 char:18
 $stream.writeline <<<< ($output)
   + CategoryInfo          : InvalidOperation: (writeline:String) [], RuntimeException
   + FullyQualifiedErrorId : InvokeMethodOnNull

ou cannot call a method on a null-valued expression.
t line:14 char:18
 $stream.writeline <<<< ($output)
   + CategoryInfo          : InvalidOperation: (writeline:String) [], RuntimeException
   + FullyQualifiedErrorId : InvokeMethodOnNull

ou cannot call a method on a null-valued expression.
t line:16 char:18
 $stream.writeline <<<< ($output)
   + CategoryInfo          : InvalidOperation: (writeline:String) [], RuntimeException
   + FullyQualifiedErrorId : InvokeMethodOnNull

ou cannot call a method on a null-valued expression.
t line:11 char:18
 $stream.writeline <<<< ($output)
   + CategoryInfo          : InvalidOperation: (writeline:String) [], RuntimeException
   + FullyQualifiedErrorId : InvokeMethodOnNull

ou cannot call a method on a null-valued expression.
t line:14 char:18
 $stream.writeline <<<< ($output)
   + CategoryInfo          : InvalidOperation: (writeline:String) [], RuntimeException
   + FullyQualifiedErrorId : InvokeMethodOnNull

ou cannot call a method on a null-valued expression.
t line:16 char:18
 $stream.writeline <<<< ($output)
   + CategoryInfo          : InvalidOperation: (writeline:String) [], RuntimeException
   + FullyQualifiedErrorId : InvokeMethodOnNull

ou cannot call a method on a null-valued expression.
t line:11 char:18
 $stream.writeline <<<< ($output)
   + CategoryInfo          : InvalidOperation: (writeline:String) [], RuntimeException
   + FullyQualifiedErrorId : InvokeMethodOnNull

ou cannot call a method on a null-valued expression.
t line:11 char:18
 $stream.writeline <<<< ($output)
   + CategoryInfo          : InvalidOperation: (writeline:String) [], RuntimeException
   + FullyQualifiedErrorId : InvokeMethodOnNull

ou cannot call a method on a null-valued expression.
t line:14 char:18
 $stream.writeline <<<< ($output)
   + CategoryInfo          : InvalidOperation: (writeline:String) [], RuntimeException
   + FullyQualifiedErrorId : InvokeMethodOnNull

ou cannot call a method on a null-valued expression.
t line:16 char:18
 $stream.writeline <<<< ($output)
   + CategoryInfo          : InvalidOperation: (writeline:String) [], RuntimeException
   + FullyQualifiedErrorId : InvokeMethodOnNull
0
goprasadAuthor Commented:
Thanks Carl, I will try running the script and will let you know if I got the desired result.
0
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
Citrix

From novice to tech pro — start learning today.

Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.