PowerShell script exchange
kortex
Influencer
Posts: 12 Liked: never
Joined: May 16, 2019 12:49 pm
Full Name: Manuel Berfelde
Contact:
Post
by kortex » May 16, 2019 12:59 pm
this post
I am trying to capture the result of Restore-VEXItem to send it by mail.
The cmdlet writes on completion something like the following to host:
Restore summary:
3 items skipped.
Can i store this to a variable?
Code: Select all
$result = Restore-VEXItem -Item $item -RestoreDeletedItem -ToFolder VeeamRestore
does not work; $result is still $null
nielsengelen
Product Manager
Posts: 5796 Liked: 1215 times
Joined: Jul 15, 2013 11:09 am
Full Name: Niels Engelen
Contact:
Post
by nielsengelen » May 16, 2019 1:55 pm
this post
There is a cmdlet called
Get-VBOExchangeItemRestoreSession which should give the result of this.
Another option is using basic PowerShell
redirection options .
Personal blog: https://foonet.be
GitHub: https://github.com/nielsengelen
kortex
Influencer
Posts: 12 Liked: never
Joined: May 16, 2019 12:49 pm
Full Name: Manuel Berfelde
Contact:
Post
by kortex » May 16, 2019 3:02 pm
this post
All I can see in Get-VBRExchangeItemRestoreSession (on-prem exchange) is the property "Result" which only returns "success" or "failed" but no details on how many items have been created or skipped.
kortex
Influencer
Posts: 12 Liked: never
Joined: May 16, 2019 12:49 pm
Full Name: Manuel Berfelde
Contact:
Post
by kortex » May 16, 2019 3:06 pm
this post
I guess this is now an feature request
:
Restore-VEXItem should return information on restored items as objects and not write to host.
kortex
Influencer
Posts: 12 Liked: never
Joined: May 16, 2019 12:49 pm
Full Name: Manuel Berfelde
Contact:
Post
by kortex » May 16, 2019 6:29 pm
this post
I tried redirecting the output from Restore-VEXItem but had no luck either.
Start-Tanscript didnt do the job, neither did Out-File or *>
Any ideas what i am missing?
kortex
Influencer
Posts: 12 Liked: never
Joined: May 16, 2019 12:49 pm
Full Name: Manuel Berfelde
Contact:
Post
by kortex » May 16, 2019 8:04 pm
this post
Looks like the output is not written to any stream?
Users browsing this forum: No registered users and 16 guests