Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Can't schedule a Job via Azure automation (get-AzureRmAutomationSchedule,new-azurermAutomationschedule, register-AzureRmAutomationScheduledRunbook) #2179

Closed
crshnbrn66 opened this issue Apr 29, 2016 · 21 comments
Labels
Automation Service Attention This issue is responsible by Azure service team.

Comments

@crshnbrn66
Copy link

I have a Azure automation script that I'm using to schedule Azure jobs.

Also Written up here: http://powershell.org/wp/forums/topic/scheduling-azure-rm-automation-schedule/

When I run the script under my own credentials and session it works fine.
When I attempt to use this with a webhook that calls script that then in turn logs in as the user specified. then attempts to run anyone of the following cmdlets (get-AzureRmAutomationSchedule,new-azurermAutomationschedule, register-AzureRmAutomationScheduledRunbook )

I get:

Get-AzureRmAutomationSchedule : Run Login-AzureRmAccount to login.
At line:54 char:16

  • ... if(Get-AzureRmAutomationSchedule -name $jobname -ResourceGro ...
  • CategoryInfo : InvalidOperation: (:) [Get-AzureRmAutomationSchedule], PSInvalidOperationException
  • FullyQualifiedErrorId : InvalidOperation,Microsoft.Azure.Commands.Automation.Cmdlet.GetAzureAutomationSchedule

I've mocked up one of the calls and use it in a Azure job and i get the same result code follows:

Param
(
[Parameter(Mandatory=$true, ValueFromPipeline=$true, ValueFromPipelineByPropertyName=$true)]
[string]$credential
)
$cred = Get-AutomationPSCredential -Name $credential
Add-AzureRmAccount -Credential $cred
set-azurermcontext -subscriptionName 'Azure Testing'
Get-AzureRmAutomationSchedule -name CaptureAlerts-MemoryPercentage -ResourceGroupName AzureTesting -AutomationAccountName AutomationAccountTest -Verbose -ErrorAction SilentlyContinue


Error:

Account Environment Subscription Tenant
——- ———– ———— ——
xxx@ok.com AzureCloud xzzzddd

ERROR: Get-AzureRmAutomationSchedule : Run Login-AzureRmAccount to login.
At line:10 char:1

  • Get-AzureRmAutomationSchedule -name CaptureAlerts-MemoryPercentage -R ...
  • CategoryInfo : InvalidOperation: (:) [Get-AzureRmAutomationSchedule], PSInvalidOperationException
  • FullyQualifiedErrorId : InvalidOperation,Microsoft.Azure.Commands.Automation.Cmdlet.GetAzureAutomationSchedule

If anyone can think of or offer advice on what I need to do or something I've forgotten I'm all ears.

@crshnbrn66
Copy link
Author

@markcowl
Copy link
Member

markcowl commented May 2, 2016

@crshnbrn66 Using ServicePrincipal is suggested for automating azure activities in powershell (or any of the Azure SDKs). User authentication will work using PSCredential, but only for OrgID accounts, and only if multi-factor authentication is not turned on for those logins.

Note that there is a much simpler script for setting up service principal certificate authenticatiuon here: https://azure.microsoft.com/en-us/blog/azps-1-0/ in the 'Certficiate Authentication with Azure Resource Manager' section.

The articale above will work, however, the MSOL cmdlets are generally not needed.

How is this script executed? Generally, your azure login is tied to the current AppDomain, unless you use Save-AzureRMProfile to save it to dis and Select-AzureRMProfile to reload it. If the cmdlets run in a different AppDomain than the login, this could be the issue.

@crshnbrn66
Copy link
Author

Awesome thank you for the feed back Mark.

@crshnbrn66
Copy link
Author

One comment... this command doesn't seem to work but on Windows 10:
$thumb = (New-SelfSignedCertificate -CertStoreLocation cert:\localmachine\my -DnsName com.foo.bar -KeyExportPolicy Exportable -Provider "Microsoft Enhanced RSA and AES Cryptographic Provider" -NotAfter $notAfter).Thumbprint

Because of the KeyExportPolicy param and -NotAfter param switches. I had to use Makecert.

:)

@markcowl
Copy link
Member

markcowl commented May 3, 2016

@crshnbrn66 Thanks, can you leave that comment on the blog post - we can add some extra notes about downlevel OS's (and how to acquire MakeCert). Will leave this open, as that blog post is due to be updated.

@crshnbrn66
Copy link
Author

I updated the code for it and created a pull request.

One other question I've now created the connection and followed the instructions in this post:
https://azure.microsoft.com/en-us/documentation/articles/automation-sec-configure-azure-runas-account/

I'm still getting errors when I attempt to get-automationscheduling information

$verbosePreference = 'continue'
$Conn = Get-AutomationConnection -Name AzureRunAsConnection 
write-output $Conn.TenantID
write-output $Conn.ApplicationID
write-output $Conn.CertificateThumbprint

$Conn = Get-AutomationConnection -Name AzureRunAsConnection 
Add-AzureRMAccount -ServicePrincipal -Tenant $Conn.TenantID -ApplicationId $Conn.ApplicationID -CertificateThumbprint $Conn.CertificateThumbprint
get-azurermSubscription | write-verbose
#Add-AzureRMAccount -ServicePrincipal -Tenant $Conn.TenantID -ApplicationId $Conn.ApplicationID -CertificateThumbprint $Conn.CertificateThumbprint
get-azurermcontext | select *
Get-AzureRmAutomationSchedule -name CaptureAlerts-MemoryPercentage -ResourceGroupName AzureTesting -AutomationAccountName AutomationAccountTest -Verbose  -ErrorAction SilentlyContinue

Error:

ERROR: Get-AzureRmAutomationSchedule : Run Login-AzureRmAccount to login.
At line:13 char:1

  • Get-AzureRmAutomationSchedule -name CaptureAlerts-MemoryPercentage -R ...
  • - CategoryInfo          : InvalidOperation: (:) [Get-AzureRmAutomationSchedule], PSInvalidOperationException
    - FullyQualifiedErrorId : InvalidOperation,Microsoft.Azure.Commands.Automation.Cmdlet.GetAzureAutomationSchedule
    

@crshnbrn66 crshnbrn66 reopened this May 3, 2016
@crshnbrn66
Copy link
Author

Here is the updated pull request I did for the Service Principal script
MicrosoftDocs/azure-docs#6478

@crshnbrn66
Copy link
Author

I'm able to Query other cmdlets using the Service principal setup... However when I try and get an automation schedule or the others identified in this issue I get the same login error.

@markcowl
Copy link
Member

markcowl commented May 5, 2016

@crshnbrn66 This looks more like an issue specific to those cmdlets. @jodoglevy Any insight into why these three cmdlets might be different than others?

@markcowl
Copy link
Member

markcowl commented May 5, 2016

@crshnbrn66 If you run the cmdlets with $DebugPreference="Continue" and include the log, I'd be curious to see the ADAL logs for these calls.

@jodoglevy
Copy link

@crshnbrn66 what module versions do you have in your automation account? What does get-module -listavailable return in a runbook?

@crshnbrn66
Copy link
Author

crshnbrn66 commented May 6, 2016

running this:
$DebugPreference = 'Continue'
$Conn = Get-AutomationConnection -Name AzureRunAsConnection
write-output $Conn.TenantID
write-output $Conn.ApplicationID
write-output $Conn.CertificateThumbprint
Add-AzureRMAccount -ServicePrincipal -Tenant $Conn.TenantID -ApplicationId $Conn.ApplicationID -CertificateThumbprint $Conn.CertificateThumbprint
get-azurermSubscription
get-azurermcontext | select *
Get-AzureRmAutomationSchedule -name CaptureAlerts-MemoryPercentage -ResourceGroupName AzureTesting -AutomationAccountName AutomationAccountTest -Verbose -ErrorAction SilentlyContinue
get-module -ListAvailable

Results:
Suspended
The job action 'Activate' cannot be run, because the process stopped unexpectedly. The job action was attempted 3 times.

azurerun.txt

@jodoglevy
Copy link

Can you run just the get module line and see what comes out?
On May 5, 2016 6:55 PM, "Thom Schumacher" notifications@github.com wrote:

running this:
$verbosePreference = 'continue'
$DebugPreference = 'Continue'
$Conn = Get-AutomationConnection -Name AzureRunAsConnection
write-output $Conn.TenantID
write-output $Conn.ApplicationID
write-output $Conn.CertificateThumbprint

$Conn = Get-AutomationConnection -Name AzureRunAsConnection
Add-AzureRMAccount -ServicePrincipal -Tenant $Conn.TenantID -ApplicationId $Conn.ApplicationID -CertificateThumbprint $Conn.CertificateThumbprint
get-azurermSubscription | write-verbose
#Add-AzureRMAccount -ServicePrincipal -Tenant $Conn.TenantID -ApplicationId $Conn.ApplicationID -CertificateThumbprint $Conn.CertificateThumbprint
get-azurermcontext | select *
Get-AzureRmAutomationSchedule -name CaptureAlerts-MemoryPercentage -ResourceGroupName AzureTesting -AutomationAccountName AutomationAccountTest -Verbose -ErrorAction SilentlyContinue
get-module -ListAvailable

Results:
Suspended
The job action 'Activate' cannot be run, because the process stopped
unexpectedly. The job action was attempted 3 times.

azurerun.txt
https://github.com/Azure/azure-powershell/files/251446/azurerun.txt


You are receiving this because you were mentioned.
Reply to this email directly or view it on GitHub
#2179 (comment)

@crshnbrn66
Copy link
Author

Only thing I ran was:

get-module -ListAvailable

Suspended
The job action 'Activate' cannot be run, because the process stopped unexpectedly. The job action was attempted 3 times.

I ran from the original run book and then from a new run book and both times it tried to run it three times to list out the modules and gave me the error above.

Directory: C:\Program Files\WindowsPowerShell\Modules
ModuleType Version Name ExportedCommands


Binary 1.0.0.0 PackageManagement {Find-Package, Get-Package, Get-PackageProvider, Get-Packag...
Script 1.0 PowerShellGet {Install-Module, Find-Module, Save-Module, Update-Module...}
Directory: C:\Windows\system32\WindowsPowerShell\v1.0\Modules

ModuleType Version Name ExportedCommands


Manifest 1.0.0.0 CimCmdlets {Get-CimAssociatedInstance, Get-CimClass, Get-CimInstance, ...
Script 1.0.0.0 ISE {New-IseSnippet, Import-IseSnippet, Get-IseSnippet}
Manifest 1.0.0.0 Microsoft.PowerShell.Archive {Compress-Archive, Expand-Archive}
Manifest 3.0.0.0 Microsoft.PowerShell.Diagnostics {Get-WinEvent, Get-Counter, Import-Counter, Export-Counter...}
Manifest 3.0.0.0 Microsoft.PowerShell.Host {Start-Transcript, Stop-Transcript}
Manifest 3.1.0.0 Microsoft.PowerShell.Management {Add-Content, Clear-Content, Clear-ItemProperty, Join-Path...}
Script 1.0 Microsoft.PowerShell.ODataUtils Export-ODataEndpointProxy
Manifest 3.0.0.0 Microsoft.PowerShell.Security {Get-Acl, Set-Acl, Get-PfxCertificate, Get-Credential...}
Manifest 3.1.0.0 Microsoft.PowerShell.Utility {Format-List, Format-Custom, Format-Table, Format-Wide...}
Manifest 3.0.0.0 Microsoft.WSMan.Management {Disable-WSManCredSSP, Enable-WSManCredSSP, Get-WSManCredSS...
Manifest 1.0.0.0 NetworkSwitchManager {Disable-NetworkSwitchEthernetPort, Enable-NetworkSwitchEth...
Manifest 1.1 PSDesiredStateConfiguration {Set-DscLocalConfigurationManager, Start-DscConfiguration, ...
Script 1.0.0.0 PSDiagnostics {Disable-PSTrace, Disable-PSWSManCombinedTrace, Disable-WSM...
Binary 1.1.0.0 PSScheduledJob {New-JobTrigger, Add-JobTrigger, Remove-JobTrigger, Get-Job...
Manifest 2.0.0.0 PSWorkflow {New-PSWorkflowExecutionOption, New-PSWorkflowSession, nwsn}
Manifest 1.0.0.0 PSWorkflowUtility Invoke-AsWorkflow
Manifest 2.0.0.0 SoftwareInventoryLogging {Get-SilComputer, Get-SilComputerIdentity, Get-SilSoftware,...
Directory: C:\Modules\User

ModuleType Version Name ExportedCommands


Manifest 1.0.6 AzureRM.Insights {Add-AzureRmMetricAlertRule, Add-AzureRmLogAlertRule, Add-A...
Manifest 1.0.6 AzureRM.profile {Enable-AzureRmDataCollection, Disable-AzureRmDataCollectio...

Directory: C:\Program Files\WindowsPowerShell\Modules

ModuleType Version Name ExportedCommands


Binary 1.0.0.0 PackageManagement {Find-Package, Get-Package, Get-PackageProvider, Get-Packag...
Script 1.0 PowerShellGet {Install-Module, Find-Module, Save-Module, Update-Module...}
Directory: C:\Windows\system32\WindowsPowerShell\v1.0\Modules

ModuleType Version Name ExportedCommands


Manifest 1.0.0.0 CimCmdlets {Get-CimAssociatedInstance, Get-CimClass, Get-CimInstance, ...
Script 1.0.0.0 ISE {New-IseSnippet, Import-IseSnippet, Get-IseSnippet}
Manifest 1.0.0.0 Microsoft.PowerShell.Archive {Compress-Archive, Expand-Archive}
Manifest 3.0.0.0 Microsoft.PowerShell.Diagnostics {Get-WinEvent, Get-Counter, Import-Counter, Export-Counter...}
Manifest 3.0.0.0 Microsoft.PowerShell.Host {Start-Transcript, Stop-Transcript}
Manifest 3.1.0.0 Microsoft.PowerShell.Management {Add-Content, Clear-Content, Clear-ItemProperty, Join-Path...}
Script 1.0 Microsoft.PowerShell.ODataUtils Export-ODataEndpointProxy
Manifest 3.0.0.0 Microsoft.PowerShell.Security {Get-Acl, Set-Acl, Get-PfxCertificate, Get-Credential...}
Manifest 3.1.0.0 Microsoft.PowerShell.Utility {Format-List, Format-Custom, Format-Table, Format-Wide...}
Manifest 3.0.0.0 Microsoft.WSMan.Management {Disable-WSManCredSSP, Enable-WSManCredSSP, Get-WSManCredSS...
Manifest 1.0.0.0 NetworkSwitchManager {Disable-NetworkSwitchEthernetPort, Enable-NetworkSwitchEth...
Manifest 1.1 PSDesiredStateConfiguration {Set-DscLocalConfigurationManager, Start-DscConfiguration, ...
Script 1.0.0.0 PSDiagnostics {Disable-PSTrace, Disable-PSWSManCombinedTrace, Disable-WSM...
Binary 1.1.0.0 PSScheduledJob {New-JobTrigger, Add-JobTrigger, Remove-JobTrigger, Get-Job...
Manifest 2.0.0.0 PSWorkflow {New-PSWorkflowExecutionOption, New-PSWorkflowSession, nwsn}
Manifest 1.0.0.0 PSWorkflowUtility Invoke-AsWorkflow
Manifest 2.0.0.0 SoftwareInventoryLogging {Get-SilComputer, Get-SilComputerIdentity, Get-SilSoftware,...
Directory: C:\Modules\User

ModuleType Version Name ExportedCommands


Manifest 1.0.6 AzureRM.Insights {Add-AzureRmMetricAlertRule, Add-AzureRmLogAlertRule, Add-A...
Manifest 1.0.6 AzureRM.profile {Enable-AzureRmDataCollection, Disable-AzureRmDataCollectio...

Directory: C:\Program Files\WindowsPowerShell\Modules

ModuleType Version Name ExportedCommands


Binary 1.0.0.0 PackageManagement {Find-Package, Get-Package, Get-PackageProvider, Get-Packag...
Script 1.0 PowerShellGet {Install-Module, Find-Module, Save-Module, Update-Module...}
Directory: C:\Windows\system32\WindowsPowerShell\v1.0\Modules

ModuleType Version Name ExportedCommands


Manifest 1.0.0.0 CimCmdlets {Get-CimAssociatedInstance, Get-CimClass, Get-CimInstance, ...
Script 1.0.0.0 ISE {New-IseSnippet, Import-IseSnippet, Get-IseSnippet}
Manifest 1.0.0.0 Microsoft.PowerShell.Archive {Compress-Archive, Expand-Archive}
Manifest 3.0.0.0 Microsoft.PowerShell.Diagnostics {Get-WinEvent, Get-Counter, Import-Counter, Export-Counter...}
Manifest 3.0.0.0 Microsoft.PowerShell.Host {Start-Transcript, Stop-Transcript}
Manifest 3.1.0.0 Microsoft.PowerShell.Management {Add-Content, Clear-Content, Clear-ItemProperty, Join-Path...}
Script 1.0 Microsoft.PowerShell.ODataUtils Export-ODataEndpointProxy
Manifest 3.0.0.0 Microsoft.PowerShell.Security {Get-Acl, Set-Acl, Get-PfxCertificate, Get-Credential...}
Manifest 3.1.0.0 Microsoft.PowerShell.Utility {Format-List, Format-Custom, Format-Table, Format-Wide...}
Manifest 3.0.0.0 Microsoft.WSMan.Management {Disable-WSManCredSSP, Enable-WSManCredSSP, Get-WSManCredSS...
Manifest 1.0.0.0 NetworkSwitchManager {Disable-NetworkSwitchEthernetPort, Enable-NetworkSwitchEth...
Manifest 1.1 PSDesiredStateConfiguration {Set-DscLocalConfigurationManager, Start-DscConfiguration, ...
Script 1.0.0.0 PSDiagnostics {Disable-PSTrace, Disable-PSWSManCombinedTrace, Disable-WSM...
Binary 1.1.0.0 PSScheduledJob {New-JobTrigger, Add-JobTrigger, Remove-JobTrigger, Get-Job...
Manifest 2.0.0.0 PSWorkflow {New-PSWorkflowExecutionOption, New-PSWorkflowSession, nwsn}
Manifest 1.0.0.0 PSWorkflowUtility Invoke-AsWorkflow
Manifest 2.0.0.0 SoftwareInventoryLogging {Get-SilComputer, Get-SilComputerIdentity, Get-SilSoftware,...
Directory: C:\Modules\User

ModuleType Version Name ExportedCommands


Manifest 1.0.6 AzureRM.Insights {Add-AzureRmMetricAlertRule, Add-AzureRmLogAlertRule, Add-A...
Manifest 1.0.6 AzureRM.profile {Enable-AzureRmDataCollection, Disable-AzureRmDataCollectio...

@jodoglevy
Copy link

According to that list you only have the Azure Insights and Profile modules in your account...are you sure that's the whole list?

@crshnbrn66
Copy link
Author

Ok this morning this ran and didn't time out here is an update:

get-module -ListAvailable

Directory: C:\Program Files\WindowsPowerShell\Modules

ModuleType Version Name ExportedCommands


Binary 1.0.0.0 PackageManagement {Find-Package, Get-Package, Get-PackageProvider, Get-Packag...

Script 1.0 PowerShellGet {Install-Module, Find-Module, Save-Module, Update-Module...}

Directory: C:\Windows\system32\WindowsPowerShell\v1.0\Modules

ModuleType Version Name ExportedCommands


Manifest 1.0.0.0 CimCmdlets {Get-CimAssociatedInstance, Get-CimClass, Get-CimInstance, ...

Script 1.0.0.0 ISE {New-IseSnippet, Import-IseSnippet, Get-IseSnippet}

Manifest 1.0.0.0 Microsoft.PowerShell.Archive {Compress-Archive, Expand-Archive}

Manifest 3.0.0.0 Microsoft.PowerShell.Diagnostics {Get-WinEvent, Get-Counter, Import-Counter, Export-Counter...}

Manifest 3.0.0.0 Microsoft.PowerShell.Host {Start-Transcript, Stop-Transcript}

Manifest 3.1.0.0 Microsoft.PowerShell.Management {Add-Content, Clear-Content, Clear-ItemProperty, Join-Path...}

Script 1.0 Microsoft.PowerShell.ODataUtils Export-ODataEndpointProxy

Manifest 3.0.0.0 Microsoft.PowerShell.Security {Get-Acl, Set-Acl, Get-PfxCertificate, Get-Credential...}

Manifest 3.1.0.0 Microsoft.PowerShell.Utility {Format-List, Format-Custom, Format-Table, Format-Wide...}

Manifest 3.0.0.0 Microsoft.WSMan.Management {Disable-WSManCredSSP, Enable-WSManCredSSP, Get-WSManCredSS...

Manifest 1.0.0.0 NetworkSwitchManager {Disable-NetworkSwitchEthernetPort, Enable-NetworkSwitchEth...

Manifest 1.1 PSDesiredStateConfiguration {Set-DscLocalConfigurationManager, Start-DscConfiguration, ...

Script 1.0.0.0 PSDiagnostics {Disable-PSTrace, Disable-PSWSManCombinedTrace, Disable-WSM...

Binary 1.1.0.0 PSScheduledJob {New-JobTrigger, Add-JobTrigger, Remove-JobTrigger, Get-Job...

Manifest 2.0.0.0 PSWorkflow {New-PSWorkflowExecutionOption, New-PSWorkflowSession, nwsn}

Manifest 1.0.0.0 PSWorkflowUtility Invoke-AsWorkflow

Manifest 2.0.0.0 SoftwareInventoryLogging {Get-SilComputer, Get-SilComputerIdentity, Get-SilSoftware,...

Directory: C:\Modules\User

ModuleType Version Name ExportedCommands


Manifest 1.0.6 AzureRM.Insights {Add-AzureRmMetricAlertRule, Add-AzureRmLogAlertRule, Add-A...

Manifest 1.0.6 AzureRM.profile {Enable-AzureRmDataCollection, Disable-AzureRmDataCollectio...

Directory: C:\Program Files\WindowsPowerShell\Modules

ModuleType Version Name ExportedCommands


Binary 1.0.0.0 PackageManagement {Find-Package, Get-Package, Get-PackageProvider, Get-Packag...

Script 1.0 PowerShellGet {Install-Module, Find-Module, Save-Module, Update-Module...}

Directory: C:\Windows\system32\WindowsPowerShell\v1.0\Modules

ModuleType Version Name ExportedCommands


Manifest 1.0.0.0 CimCmdlets {Get-CimAssociatedInstance, Get-CimClass, Get-CimInstance, ...

Script 1.0.0.0 ISE {New-IseSnippet, Import-IseSnippet, Get-IseSnippet}

Manifest 1.0.0.0 Microsoft.PowerShell.Archive {Compress-Archive, Expand-Archive}

Manifest 3.0.0.0 Microsoft.PowerShell.Diagnostics {Get-WinEvent, Get-Counter, Import-Counter, Export-Counter...}

Manifest 3.0.0.0 Microsoft.PowerShell.Host {Start-Transcript, Stop-Transcript}

Manifest 3.1.0.0 Microsoft.PowerShell.Management {Add-Content, Clear-Content, Clear-ItemProperty, Join-Path...}

Script 1.0 Microsoft.PowerShell.ODataUtils Export-ODataEndpointProxy

Manifest 3.0.0.0 Microsoft.PowerShell.Security {Get-Acl, Set-Acl, Get-PfxCertificate, Get-Credential...}

Manifest 3.1.0.0 Microsoft.PowerShell.Utility {Format-List, Format-Custom, Format-Table, Format-Wide...}

Manifest 3.0.0.0 Microsoft.WSMan.Management {Disable-WSManCredSSP, Enable-WSManCredSSP, Get-WSManCredSS...

Manifest 1.0.0.0 NetworkSwitchManager {Disable-NetworkSwitchEthernetPort, Enable-NetworkSwitchEth...

Manifest 1.1 PSDesiredStateConfiguration {Set-DscLocalConfigurationManager, Start-DscConfiguration, ...

Script 1.0.0.0 PSDiagnostics {Disable-PSTrace, Disable-PSWSManCombinedTrace, Disable-WSM...

Binary 1.1.0.0 PSScheduledJob {New-JobTrigger, Add-JobTrigger, Remove-JobTrigger, Get-Job...

Manifest 2.0.0.0 PSWorkflow {New-PSWorkflowExecutionOption, New-PSWorkflowSession, nwsn}

Manifest 1.0.0.0 PSWorkflowUtility Invoke-AsWorkflow

Manifest 2.0.0.0 SoftwareInventoryLogging {Get-SilComputer, Get-SilComputerIdentity, Get-SilSoftware,...

Directory: C:\Modules\User

ModuleType Version Name ExportedCommands


Manifest 1.0.6 AzureRM.Insights {Add-AzureRmMetricAlertRule, Add-AzureRmLogAlertRule, Add-A...

Manifest 1.0.6 AzureRM.profile {Enable-AzureRmDataCollection, Disable-AzureRmDataCollectio...

Directory: C:\Program Files\WindowsPowerShell\Modules

ModuleType Version Name ExportedCommands


Binary 1.0.0.0 PackageManagement {Find-Package, Get-Package, Get-PackageProvider, Get-Packag...

Script 1.0 PowerShellGet {Install-Module, Find-Module, Save-Module, Update-Module...}

Directory: C:\Windows\system32\WindowsPowerShell\v1.0\Modules

ModuleType Version Name ExportedCommands


Manifest 1.0.0.0 CimCmdlets {Get-CimAssociatedInstance, Get-CimClass, Get-CimInstance, ...

Script 1.0.0.0 ISE {New-IseSnippet, Import-IseSnippet, Get-IseSnippet}

Manifest 1.0.0.0 Microsoft.PowerShell.Archive {Compress-Archive, Expand-Archive}

Manifest 3.0.0.0 Microsoft.PowerShell.Diagnostics {Get-WinEvent, Get-Counter, Import-Counter, Export-Counter...}

Manifest 3.0.0.0 Microsoft.PowerShell.Host {Start-Transcript, Stop-Transcript}

Manifest 3.1.0.0 Microsoft.PowerShell.Management {Add-Content, Clear-Content, Clear-ItemProperty, Join-Path...}

Script 1.0 Microsoft.PowerShell.ODataUtils Export-ODataEndpointProxy

Manifest 3.0.0.0 Microsoft.PowerShell.Security {Get-Acl, Set-Acl, Get-PfxCertificate, Get-Credential...}

Manifest 3.1.0.0 Microsoft.PowerShell.Utility {Format-List, Format-Custom, Format-Table, Format-Wide...}

Manifest 3.0.0.0 Microsoft.WSMan.Management {Disable-WSManCredSSP, Enable-WSManCredSSP, Get-WSManCredSS...

Manifest 1.0.0.0 NetworkSwitchManager {Disable-NetworkSwitchEthernetPort, Enable-NetworkSwitchEth...

Manifest 1.1 PSDesiredStateConfiguration {Set-DscLocalConfigurationManager, Start-DscConfiguration, ...

Script 1.0.0.0 PSDiagnostics {Disable-PSTrace, Disable-PSWSManCombinedTrace, Disable-WSM...

Binary 1.1.0.0 PSScheduledJob {New-JobTrigger, Add-JobTrigger, Remove-JobTrigger, Get-Job...

Manifest 2.0.0.0 PSWorkflow {New-PSWorkflowExecutionOption, New-PSWorkflowSession, nwsn}

Manifest 1.0.0.0 PSWorkflowUtility Invoke-AsWorkflow

Manifest 2.0.0.0 SoftwareInventoryLogging {Get-SilComputer, Get-SilComputerIdentity, Get-SilSoftware,...

Directory: C:\Modules\User

ModuleType Version Name ExportedCommands


Manifest 1.0.6 AzureRM.Insights {Add-AzureRmMetricAlertRule, Add-AzureRmLogAlertRule, Add-A...

Manifest 1.0.6 AzureRM.profile {Enable-AzureRmDataCollection, Disable-AzureRmDataCollectio...

@jodoglevy
Copy link

I still only see the Azure insights and profile modules. If you go in to your automation account to Assets -> Modules -> what Azure/AzureRM modules show up, and what is the version listed for each?

@crshnbrn66
Copy link
Author

Azure 1.0.3
Azurerm.computer 1.2.1
Auzrerm.Automation 1.0.3
Azurerm.Insights 1.0.6
Azurerm.profile 1.0.6
Azurerm.resources 1.0.3
Azurerm.SQL 1.0.3
Azurerm.storage 1.0.3

I see what you are getting / driving at I'll make some updates.

@jodoglevy
Copy link

Yes looks like your Azure/AzureRM modules are not of the same version. AzureRM PowerShell modules can run into issues if they are using mismatched versions. Try updating all your Azure/AzureRM modules to the latest version.

@crshnbrn66
Copy link
Author

Joe thank you very much for your time and insight.

@crshnbrn66
Copy link
Author

crshnbrn66 commented May 9, 2016

For what its worth. I could have saved myself 5 days if I'd have updated the modules first.

@bsiegel bsiegel added the Service Attention This issue is responsible by Azure service team. label Sep 26, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Automation Service Attention This issue is responsible by Azure service team.
Projects
None yet
Development

No branches or pull requests

4 participants