Hello everyone,
I’ve recently installed PowerShell Universal to explore its potential as an automation tool for our IT department. However, I’ve encountered an issue that I’m hoping someone here can help me resolve.
When attempting to run a job, I encountered the following error:
Method not found: 'Void Azure.Data.Tables.TableServiceClient..ctor(System.Uri, Azure.Core.TokenCredential, Azure.Data.Tables.TableClientOptions)'.
This error occurs while executing the Get-AzStorageTable
command from the Az.Storage module. Interestingly, the command works perfectly when run through a regular PowerShell prompt, but it fails when executed within PowerShell Universal.
Has anyone experienced a similar issue or have any insights on how to resolve this?
Thanks in advance for your help!
In PSU, what is your environment set to for that job? If it’s set to Default, what is Default set to, under Settings/General/Environments?
It’s possible that cmdlet is only available in specific versions of PowerShell, so if your running it in PowerShell 5.x and it’s only compatible with PowerShell 7.x, it could cause an issue like that. Not saying that’s the issue here - just a possibility.
According to the official documentation:
The Az PowerShell module is based on the .NET Standard library and works with PowerShell 7.2 and later on all platforms including Windows, Linux, and macOS. It’s also compatible with Windows PowerShell 5.1.
It looks like that did the trick, my default was set to PS 7.3.7 but when I went and forced it to use PS 7.4.3 it worked
Thank you
1 Like
Strange that it wouldn’t work with 7.3.7, given that their documentation says 7.2 and newer are compatible. Maybe there was a bug in that version, or something.