I created azure function with Powershell option 7.2
under app file -> requirements.pds1, decommented ‘8.*
and introduced
Import-Module MsOnline -UseWindowsPowershell
Import-Module Partnerenter -UseWindowsPowershell
in my run.ps1
Despite these changes , I am getting below error
the Term Get-AzSubscription
Please help to fix this issue
Thanks in advance
Ramabadran
2
Answers
Please be informed that if you’re using Azure functions then its installed already.
You might be having some syntax issue that you may need to check or you might have referenced AzureRM comand let before Az commandlet.
Please review your code first. The better option would be to enabled verbose logging using -verbose switch.
You can even import module using command Import-Module but in my opinion this is not required knowing this module is preinstalled on PAAS offering by default.
Install-Module Az
,Import-Module Az
in the project workspace/path of the terminal.requirements.psd1
, uncomment the line'Az' = '8.*'
.