Azure-docs: PowerShell Commands Not Present

Created on 11 Jul 2018  Â·  8Comments  Â·  Source: MicrosoftDocs/azure-docs

It seems that the latest version of the AzureRM.SQL modules, even with pre-release allowed is 1.10, these do not seem to have the elastic job commands. Can you confirm how to obtain these, as the steps in the article do not work?


Document Details

⚠ Do not edit this section. It is required for docs.microsoft.com ➟ GitHub issue linking.

assigned-to-author product-question sql-databassvc triaged

All 8 comments

@sam-cogan Thanks for the feedback. We are actively investigating and will get back to you soon.

@sam-cogan Thanks for the feedback! I have assigned the issue to the content author to evaluate and update as appropriate, as I am unable to proceed beyond the first set of instructions outlined in the prerequisites.

screenshot 97

@Mike-Ubezzi-MSFT for your issue, try restarting powershell. It seems it requires a restart before the -AllowPrerelease flag can get used. Likely a bug in Install-Module bits.

After investigation this is due to there being a new version of Azure Sql Powershell 4.10.0.

The Elastic Jobs cmdlets are in public preview and are not included in the latest version 4.10.0. Hence causing the cmdlets to be missing.

Documentation needs to be updated such that it uses this version 4.8.1 specifically:
https://www.powershellgallery.com/packages/AzureRM.Sql/4.8.1-preview

Install-Module -Name AzureRM.Sql -RequiredVersion 4.8.1-preview -AllowPrerelease
Import-Module AzureRM.Sql -RequiredVersion 4.8.1

Hi @sam-cogan, sorry for the inconvenience.

Can you try following these steps instead for the pre-requisites? I'll be updating the docs as such:

# Open Powershell with Administrative access
# Installs the latest PackageManagement powershell package which PowershellGet v1.6.5 is dependent on
Find-Package PackageManagement -RequiredVersion 1.1.7.2 | Install-Package -Force

# Installs the latest PowershellGet module which adds the -AllowPrerelease flag to Install-Module
Find-Package PowerShellGet -RequiredVersion 1.6.5 | Install-Package -Force

# Restart your powershell session with administrative access

# Places AzureRM.Sql preview cmdlets side by side with existing AzureRM.Sql version
Install-Module -Name AzureRM.Sql -AllowPrerelease -RequiredVersion 4.8.1-preview -Force

# Import the AzureRM.Sql 4.8.1 module
Import-Module AzureRM.Sql -RequiredVersion 4.8.1

# Confirm if module successfully imported - if the imported version is 4.8.1, then continue
Get-Module AzureRM.Sql

Once you've completed those steps, try running to see if the cmdlets are successfully imported.

Get-Help Get-AzureRmSqlElasticJobAgent

Thanks again for filing this.

Thanks, I can confirm this is all working using 4.8.1 and I was able to run through a successful demo of the service today.

@sam-cogan that's amazing news! glad to see things the tools are working well for you.
If you'd like to share your use case with the Elastic Jobs team or have any recommendations for improvement, feel free to contact @srinia @jaredmoo or me.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

AronT-TLV picture AronT-TLV  Â·  3Comments

bityob picture bityob  Â·  3Comments

mrdfuse picture mrdfuse  Â·  3Comments

Agazoth picture Agazoth  Â·  3Comments

monteledwards picture monteledwards  Â·  3Comments