Hi,
The output from a script that loads the Veeam SnapIn is a bit different from the output you get from the PowerShell in the Veeam Backup & Replication main menu.
In particular, the SnapIn output appears to be a lot more verbose showing every property in the returned object while the bult-in Powershell renders its output in nicely formatted tables.
How can I get the output from my powershell scripts to be more like the one you get with the Powershell from the Veeam B&R menu?
Thanks
-
- Novice
- Posts: 8
- Liked: never
- Joined: Dec 11, 2014 2:19 pm
- Full Name: Val Bogda
- Contact:
-
- Veeam Software
- Posts: 649
- Liked: 170 times
- Joined: Dec 10, 2012 8:44 am
- Full Name: Nikita Efes
- Contact:
Re: Different Powershell output styles
You can use Format-List, Format-Table and similar commandlets to customize your output.
-
- Novice
- Posts: 8
- Liked: never
- Joined: Dec 11, 2014 2:19 pm
- Full Name: Val Bogda
- Contact:
Re: Different Powershell output styles
Nice, thanks. Obviously, Powershell scripting is new to me.
Would you know how to make Format-Table the default, say for a script? Sorry, my google foo has failed me.
Would you know how to make Format-Table the default, say for a script? Sorry, my google foo has failed me.
-
- Product Manager
- Posts: 20415
- Liked: 2302 times
- Joined: Oct 26, 2012 3:28 pm
- Full Name: Vladimir Eremin
- Contact:
Re: Different Powershell output styles
Check this topicif you want to get output similar to the one you see when PS's executed via backup server GUI; should be helpful. Thanks.
Who is online
Users browsing this forum: No registered users and 6 guests