Hi @Shwetha J
I was not able to get this to work and the SqlServer module running on Automation Account PowerShell 7.2 is a known issue. Attempting to install the module resulted in
Error:
Install-Module:
Line |
2 | Install-Module SqlServer -AllowClobber -SkipPublisherCheck -Force -Sc …
| ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
| NuGet provider is required to interact with NuGet-based repositories. Please ensure that '2.8.5.201' or newer version of NuGet provider is installed.
Installing the Nuget-based provider via Install-PackageProvider -Name NuGet -Force
didn't resolve the issue either. Checking PowerShell Gallery | SqlServer.psm1 22.2.0 shows that 22.2.0 requires PowerShell 7.2.1 or higher. Even though I wasn't getting this message and considering that it does work in PowerShell 5.1, I'm inclined to think that currently the SqlServer module is not supported in 7.2 for Automation Account, as others have stated in this open GitHub issue.