PowerShell script exchange
Post Reply
rolflobker
Service Provider
Posts: 22
Liked: 4 times
Joined: Oct 13, 2016 6:52 pm
Full Name: Rolf Lobker
Contact:

When can we expect to see no more Windows Powershell dependancy?

Post by rolflobker » 1 person likes this post

Ran into this issue last weekend, when working on scripts to retrieve VBR data (gave up for now, doesn't work unfortunately)
Just installed most recent VBO 365, ran into same issue

Apparantly the Cmdlets will only run under Windows PowerShell.
Throwing errors when ran from PowerShell.

Import-Module has a parameter, -UseWindowsPowerShell, which runs a seperate Windows PowerShell session in the background and imports the module there.
But everything gets deserialized, this is not convenient to say the least.

Only working bypass seems to be;

Code: Select all

$result = Invoke-Command -Session $session -ScriptBlock {
    Import-Module Veeam.Backup.Powershell -UseWindowsPowerShell ; Get-VBRBackup | fl *
   }
return $result
Where $session is a PSSession to a backupserver.

But since this returns deserialized data, it cannot be used as objects for any further actions.

When can we expect to see no more (legacy) Windows Powershell dependancy?
Mildur
Product Manager
Posts: 8735
Liked: 2294 times
Joined: May 13, 2017 4:51 pm
Full Name: Fabian K.
Location: Switzerland
Contact:

Re: When can we expect to see no more Windows Powershell dependancy?

Post by Mildur »

Hi Rolf

Thanks for the request. I don‘t have an answer right now to your questions, but could you use our RestAPI as an Alternative? The RestAPI doesn‘t have OS dependency and can be queried from many script languages.

https://helpcenter.veeam.com/docs/vbo36 ... tml?ver=60

Thanks
Fabian
Product Management Analyst @ Veeam Software
oleg.feoktistov
Veeam Software
Posts: 1918
Liked: 636 times
Joined: Sep 25, 2019 10:32 am
Full Name: Oleg Feoktistov
Contact:

Re: When can we expect to see no more Windows Powershell dependancy?

Post by oleg.feoktistov » 1 person likes this post

Hi Rolf,

Am I assuming correctly that by Powershell you mean Powershell Core (starting from PS v6) ?
So your question is about Veeam Powershell module becoming compatible with Powershell v6+ and platform-agnostic, right?
If that's the case, have a look at this topic.
Long story short, this change is possible, but requires a huge effort to migrate and transform all the product code from .NET Framework to .NET. So, can't really say when.


Thanks,
Oleg
Post Reply

Who is online

Users browsing this forum: No registered users and 12 guests