troubleshooting Question

powershell automatic variable for results

Avatar of Kelly Garcia
Kelly GarciaFlag for United Kingdom of Great Britain and Northern Ireland asked on
PowershellScripting Languages
21 Comments1 Solution201 ViewsLast Modified:
HI All,

Is there an automatic variable that tells me the results of the last run command on Powershell? for example I run this command to migrate mailboxes:

New-MoveRequest -Identity $m[$d] -TargetDatabase $TargetDatabase -WhatIf

I want the results that are outputted on the powershell screen to be stored in a variable that I can then use to output in a textbox I created using wpf.

thank you in advance for your help.
Chris Dent
PowerShell Developer
Join our community to see this answer!
Unlock 1 Answer and 21 Comments.
Start Free Trial
Learn from the best

Network and collaborate with thousands of CTOs, CISOs, and IT Pros rooting for you and your success.

Andrew Hancock - VMware vExpert
See if this solution works for you by signing up for a 7 day free trial.
Unlock 1 Answer and 21 Comments.
Try for 7 days

”The time we save is the biggest benefit of E-E to our team. What could take multiple guys 2 hours or more each to find is accessed in around 15 minutes on Experts Exchange.

-Mike Kapnisakis, Warner Bros