GithubHelp home page GithubHelp logo

runbooks's Introduction

runbooks

Sample Automation runbooks

runbooks's People

Contributors

ab0907 avatar akshansh-msft avatar anatolib avatar anirudhgarg avatar automationproductteam avatar chdafni-msft avatar d1v38om83r avatar dmohanta avatar dtzar avatar eamonoreilly avatar elcooper avatar jaspkaur28 avatar jennyhunter-msft avatar jodoglevy avatar krmanupa avatar lr90 avatar mahakjain314 avatar mgajda83 avatar mortenlerudjordet avatar nillsf avatar omairabdullah avatar rickflist avatar rohitminni25 avatar romit-kumar avatar sushil490023 avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

runbooks's Issues

Runbook Parameters

Hi there,
I'm new to Auzre Automation, therefore I'm a little confused with the Parameters, For the Mandatory field VMResourceGroup, I used [EmptyString] then added a resource group, and VM for the AlreadyonboardedVM and AlreadyonboardedVMResourceGroup. But I'm getting the error: Cannot bind argument to parameter 'Vmresourcegroup because it is an empty string.
error
Config
New Update Deployment
UpdateManagement

Thank you

Cannot use script on Server Core when MFA is enabled.

Cannot use script on Server Core when MFA is enabled.

PS C:\Users\admin> New-OnPremiseHybridWorker.ps1 @NewOnPremiseHybridWorkerParameters
Importing necessary modules...
     Successfully installed version 5.2.0 of Az...
Pulling Azure account credentials...
Connecting with the Following Parameters
WARNING: Unable to acquire token for tenant 'organizations'
WARNING: Please run 'Connect-AzAccount -DeviceCode' if browser is not supported in this session.
Connect-AzAccount : InteractiveBrowserCredential authentication failed: Unable to load DLL 'IEFRAME.dll': The specified module could not be found. (Exception from HRESULT: 0x8007007E)
At C:\Program Files\WindowsPowerShell\Scripts\New-OnPremiseHybridWorker.ps1:237 char:12
+ $Account = Connect-AzAccount @paramsplat
+            ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    + CategoryInfo          : CloseError: (:) [Connect-AzAccount], AuthenticationFailedException
    + FullyQualifiedErrorId : Microsoft.Azure.Commands.Profile.ConnectAzureRmAccountCommand

PS C:\Users\admin>

Bug in Azure Automation Powershell Version

the version of powershell run in azure automation has a bug for ps objects count when the value is 1.

sample code:

$myHashtable1 = @{
Name = 'Bob'
State = 'New York'
}

$myHashtable2 = @{
Name = 'Bob'
State = 'New York'
}

$myHashtable3 = @{
Name = 'Joe'
State = 'New Jersey'
}

$PSVersionTable

$MyPSObject = @()

$MyPSObject += [pscustomobject]$myHashtable1
$MyPSObject.Count
$MyPSObject += [pscustomobject]$myHashtable2
$MyPSObject.Count
$MyPSObject += [pscustomobject]$myHashtable3
$MyPSObject.Count

$justJoe = $MyPSObject | Where-Object { $_.Name -eq "Joe" }
$justJoe.Count # this will not return a value when it should
$justJoe | measure-object

DSC Deployment: System.Management.Automation.PSCredential Not Recognized

Currently we are unable to perform automated registration of our servers via DSC as it isn't allowing System.Management.Automation.PSCredential to be used for the Credentials.

"unknown_user_type: Unknown User Type"

I'm not technically sure if you would class this as an issue, but it would be useful if it was possible.

Thanks

GetType() method call on Automation Variable's Value causing runbook to fail and suspend

I'm trying to print the type of the value of Azure Automation Account's Automation variable using the below code in an automation runbook of type PowerShell.

$var1 = ((Get-AzureRmAutomationVariable -Name "ArrayVar" -ResourceGroupName "automation-ps-rg" -AutomationAccountName "automation-ps-aa").Value).GetType()
$var1

I'm seeing that this causes runbook to fail and retry for 3 times and eventually fail with the below message.

Suspended
The runbook job was attempted 3 times, but it failed each time.

This also happens when I replace the Get-AzureRmAutomationVariable cmdlet with Get-AutomationVariable cmdlet

Currently doing a .GetType().Name to get the name of the type but printing the System.Type object to stream seems to be failing as suggested by the answer posted here on Stack Overflow.

New-OnPremiseHybridWorker.ps1 needs updating...

Please update your script:

  1. Parameters do not adhere to your new resource names. AKA OMS = Log Analytics Workspace.
  2. Please support new Az modules. At the very least, use Enable-AzureRmAlias.
  3. Please support service principals instead of credentials.

Thanks

The remote name could not be resolved: 'msconfiggallery.cloudapp.net'

I keep getting the following when I run this in my Internal MAG sub.

`Invoke-RestMethod : The remote name could not be resolved: 'msconfiggallery.cloudapp.net'
At line:96 char:21

  • ... rchResult = Invoke-RestMethod -Method Get -Uri $CurrentModuleUrl -Use ...
  •             ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    
    • CategoryInfo : InvalidOperation: (System.Net.HttpWebRequest:HttpWebRequest) [Invoke-RestMethod],
      WebException
    • FullyQualifiedErrorId : WebCmdletWebResponseException,Microsoft.PowerShell.Commands.InvokeRestMethodCommand
      `

Error in Get-AutomationCertificate for PowerShell 7.2

The Get-AutomationCertificate command does not work in PowerShell 7.2 runtime.

The same command works without any problem in PowerShell 5.1. Addition to that, it was also working for the PowerShell 7.2 10 days ago. It is a new bug in the 7.2 runtime. The 7.2 runtime somehow does not have access to the automation account certificates.

The error message: Object not found.

That means, we don't have any possibility to use certificates with the PowerShell 7.2 runtime. I would be very happy, if there would be fix for that as soon as possible.

Thank you!!

Azure Keyvault secret auto rotation and notification before expiry

We are following the answer provided in stackoverflow and trying to automate the secret expiry notification of our key vaults and enable auto rotation of secrets using azuredevops pipelines.

We are getting "No such host is known" error while we are trying to invoke the azuredevops server pipeline hosted in on premise from the azure runbook automation script.

param
(
[Parameter (Mandatory = $false)]
[object] $WebhookData
)

#If runbook was called from Webhook, WebhookData will not be null.
if ($WebhookData) {
#Run Azure DevOps REST API to trigger the pipeline
$token = "xxxxxxxxxxxxxxxxxxxxx"
$token = [System.Convert]::ToBase64String([System.Text.Encoding]::ASCII.GetBytes(":$($token)"))
$url = "https://myado.com/devops/myorganization/myproject/_apis/build/builds?api-version=6.0"
$body = @"
{
    `"definition`":  {
                       `"id`":  xxxxx
                   }
}
"@
$head = @{ Authorization =" Basic $token" }
Invoke-RestMethod -Uri $url -Method Post -Headers $head -Body $body -ContentType application/json
}
else
{
# Error
write-Error "No input data found." 
}

Import Azure Modules to Automation

Need some help, this may not actually be a script issue.

the Following code errors when run in the script:

$ModuleContentUrl = (Invoke-WebRequest -Uri $ModuleContentUrl -MaximumRedirection 0 -UseBasicParsing -ErrorAction Ignore).Headers.Location

When it run's the parameter is set to the following:
$ModuleContentUrl = "https://www.powershellgallery.com/api/v2/package/Az.Automation/1.3.5"

And we get the following error:

Invoke-WebRequest : Object moved
Object moved to here.

At line:1 char:22

  • ... ntentUrl = (Invoke-WebRequest -Uri $ModuleContentUrl -MaximumRedirect ...
  •             ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    
  • CategoryInfo : InvalidOperation: (Method: GET, Reques\u2026PowerShell/6.2.3
    }:HttpRequestMessage) [Invoke-WebRequest], HttpResponseException
  • FullyQualifiedErrorId : WebCmdletWebResponseException,Microsoft.PowerShell.Commands.InvokeWebRequestCommand

Any guidance would be great.

import_py3package_from_pypi broken

Hi,

i just followed the azure documentation and used the import_py3package_from_pypi script. The script seems to be completly broken.

  1. The send_webservice_import_module_request functions is not called anywhere
  2. There is a token reference but the needed declaration is missing

Switching to the recommended PS 7.2 runbook the JSON output contains unwanted data

I switched some hybrid worker runbooks to PS7.2 and everything seems to be working fine however the output now comes with extra chatter that seems to be part of the verbose logging (which is also disabled.). It looks like there is some sort of data leak happening.

`Name Value


PSVersion 7.4.1
PSEdition Core
GitCommitId 7.4.1
OS Microsoft Windows 10.0.17763
Platform Win32NT
PSCompatibleVersions {1.0, 2.0, 3.0, 4.0…}
PSRemotingProtocolVersion 2.3
SerializationVersion 1.1.0.1
WSManStackVersion 3.0`

image

Since the JSON output is used in a Logic App it completely tripped the logic app as well due malformed JSON.

image

Line 364: Incorrect path to MMA folder

It fails to find the MMA directory which exists in the correct path as anticipated, maybe its unable to get the version number folder name?

After modifying Line 364 to the full path it works fine
i.e. cd "C:\Program Files\Microsoft Monitoring Agent\Agent\AzureAutomation\7.3.837.0\HybridRegistration"

Failed to install script on Windows Server 2016 Datacenter Azure VM

When I run the command to install the script, I am receiving the following error.

Install-Script -Name New-OnPremiseHybridWorker

PackageManagement\Install-Package : Script 'C:\Users\R-Cc\AppData\Local\Temp\77671\New-OnPremiseHybridWorker\New-OnPremiseHybridWorker.ps1' is missing required metadata properties. Verify that the script file has Version, Guid, Description and 
Author properties. You can use the Update-ScriptFileInfo or New-ScriptFileInfo cmdlet to add or update the PSScriptInfo to the script file.
At C:\Program Files\WindowsPowerShell\Modules\PowerShellGet\1.0.0.1\PSModule.psm1:3500 char:21
+ ...          $null = PackageManagement\Install-Package @PSBoundParameters
+                      ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    + CategoryInfo          : InvalidArgument: (C:\Users\R-Cc...ybridWorker.ps1:String) [Install-Package], Exception
    + FullyQualifiedErrorId : MissingRequiredPSScriptInfoProperties,Test-ScriptFileInfo,Microsoft.PowerShell.PackageManagement.Cmdlets.InstallPackage

I was able to install it on Windows10 workstation and noticed that the script file has all the parameters mentioned above except 'Description'.

One interesting log I found is

VERBOSE: Hash for package 'New-OnPremiseHybridWorker' does not match hash provided from the server.

Did anyone else face this issue?

Errors not logged when using $ErrorActionPreference = 'Stop' in PowerShell

I have two requirements for error handling in a PowerShell runbook:

  1. Execution stops with the status 'Failed' when an error occurs; and
  2. The error is visible in the runbook job's error logs

I've tried several minimal scripts while attempting to meet these requirements, however none satisfy both together.

  1. Default behaviour:
$result = Invoke-WebRequest -Uri 'https://httpbin.org/status/404'
  1. Stop on error:
$ErrorActionPreference = 'Stop'
$result = Invoke-WebRequest -Uri 'https://httpbin.org/status/404'
  1. Catch and explicitly log error:
$ErrorActionPreference = 'Stop'
try {
    $result = Invoke-WebRequest -Uri 'https://httpbin.org/status/404'
}
catch {
    Write-Error $_
}
  1. Catch and explicitly throw error:
$ErrorActionPreference = 'Stop'
try {
    $result = Invoke-WebRequest -Uri 'https://httpbin.org/status/404'
}
catch {
    Throw $_
}

Practically, catching and throwing the same error shouldn't be any different to not catching it in the first place (as in scenario 2), however I've included it here for completeness.

Results

Scenario Runbook status Error logged Requirements
1. Default behaviour Completed Yes ❌ ✔️
2. Stop on error Failed None found ✔️ ❌
3. Catch and log Failed None found ✔️ ❌
4. Catch and throw Failed None found ✔️ ❌

Is it possible to set up a PowerShell runbook that will satisfy both of my requirements?

I'm using a PowerShell 5.1 runbook running on 'Azure' in the Australia East region.

Runbook multiple issues

Error: Runbook "Enable-MultipleSolution" cannot find cmdlet Find-AzureRMResource.

When executing runbook Exception shows:
The module AzureRM.OperationalInsights is not available. Please import from the gallery on the modules page. (The module AzureRM.OperationalInsights is not available. Please import from the gallery on the modules page.)

This Module has been imported correctly as shown in the guide.

Specific runbook error shows:
Find-AzureRmResource : The term 'Find-AzureRmResource' is not recognized as the name of a cmdlet, function, script file, or operable program.

A little research shows me that the runbook "Enable-MultiSolution" needs the modules AzureRM.Profile.Netcore and AzureRM.Resources.Netcore which contains the function Find-AzureRMResource.

However, when importing AzureRM.Profile.Netcore the following error shows:
Importing of module failed
Error importing the module AzureRM.Profile.Netcore. Import failed with the following error: Orchestrator.Shared.AsyncModuleImport.ModuleImportException: While importing the module, an error occurred while processing the module content. Internal error message: The following error occurred while loading the extended type data file: , C:\Users\Client\Temp\MJMVYOUSHV\AzureRM.Profile.Netcore\Microsoft.Azure.Commands.Profile.types.ps1xml(85) : Error: Unable to find type [Microsoft.Azure.Commands.Profile.Models.AzureContextConverter]. .

I also tried deleting AzureRM.Resources, AzureRM.Profile & AzureRM.Automation which resets modules to version 1.0.3.

Starting Runbook now gives the following error:
_Find-AzureRmResource : A parameter cannot be found that matches parameter name 'AzureRmContext'.
At line:116 char:98

  • ... eType Microsoft.Automation/AutomationAccounts -AzureRmContext $Subscr ..._

So I replaced -AzureRMContext with -DefaultProfile but then DefaultProfile is unknown.

I give up. This solution needs some reviewing and updating. Please advise. Followed the guide:
https://docs.microsoft.com/en-us/azure/automation/automation-onboard-solutions

New-OnPremiseHybridWorker fails in PS 7

Running New-OnPremiseHybridWorker in PowerShell 7 fails with the following error:
Exception: C:\Users\theboss\Documents\PowerShell\Scripts\New-OnPremiseHybridWorker.ps1:385 Line | 385 | throw "The HybridRegistration module was not found. Please ensure … | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ | The HybridRegistration module was not found. Please ensure the Microsoft Monitoring Agent was | correctly installed.

The failure seems to be on
Import-Module .\HybridRegistration.psd1
...which returns
Import-Module: Could not load type 'System.Web.HttpException' from assembly 'System.Web, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a'.

This works in PowerShell 5.1, but I'm not able to run the full script in 5.1 because I need to retain the AzureRM module. I don't want to downgrade to PowerShell 6...

BUG: New-OnPremiseHybridWorker assumes PSGallery as source

Cause
When script is run, it assumes PSGallery as (single) source for AzureRm. The script fails when there are more sources for the defined module, because it finds multiple versions.

C:\Program Files\WindowsPowerShell\scripts\New-OnPremiseHybridWorker.ps1 : Cannot process argument transformation on parameter
'RequiredVersion'. Cannot convert value to type System.String.
At line:1 char:1
+ .\New-OnPremiseHybridWorker.ps1 -AutomationAccountName Billing -AARes ...
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    + CategoryInfo          : InvalidData: (:) [New-OnPremiseHybridWorker.ps1], ParameterBindingArgumentTransformationException
    + FullyQualifiedErrorId : ParameterArgumentTransformationError,New-OnPremiseHybridWorker.ps1

Solution
Add the source in the code

Script attempts to make a new OM Resource Group when AAResourceGroup doesn't match OMResource group

The following code
# Check that the resource groups are valid $null = Get-AzureRmResourceGroup -Name $AAResourceGroupName if ($OMSResouceGroupName) { $null = Get-AzureRmResourceGroup -Name $OMSResourceGroupName } else { $OMSResourceGroupName = $AAResourceGroupName }
should be more like

# Check that the resource groups are valid if (-not $OMSResouceGroupName) { $OMSResouceGroupName = Get-AzureRmResourceGroup -Name $AAResourceGroupName | select -ExpandProperty ResourceGroupName }

Unable to update azure sdk for python3 in automation

I tried to use the import python3 package script to update azure mgmt libraries.

Everything works fine however when I install adal, it installs a new version of cryptographie and now, I am unable to login by token because of the error :

The version of cryptography does not match the loaded shared object. This can happen if you have multiple copies of cryptography installed in your Python path. Please try creating a new virtual environment to resolve this issue. Loaded python version: 3.4.6, shared object version: b'2.8'

Error in Get-AutomationVariable for PowerShell 7.2

I noticed that Get-AutomationVariable in PowerShell 7.1 returns a normal string for a string variable:

  • Value

But in PowerShell 7.2 the returned string contains quotation marks as part of the variable itself:

  • "Value"

I'm not sure if this is due to the implementation of Get-AutomationVariable or something in the new PowerShell version, but it seems like you should not have to strip quotation marks from a string variable prior to using it.

Bug: Starting runbook import_py3package_from_pypi.py fails

I have created a runbook for running the python file:
https://github.com/azureautomation/runbooks/blob/master/Utility/Python/import_py3package_from_pypi.py
However when I start it, it fails. It seems there is a bug in getting the parameters.
By starting it from portal, it doesn't ask for any parameters. I have also tried to run it via powershell:

$params = @{"subscription_id"="xxx";"resource_group"="xxx";"automation_account"=xxx;"module_name"="xxx"}
Start-AzAutomationRunbook -AutomationAccountName "xxx" -Name "xxx" -ResourceGroupName "xxx" -Parameters $params

I have followed the following doc:
python-3-packages

After it failed when I check the input , the parameter names display like: [PARAMETER 1], [PARAMETER 2],...

Sorry.. I just realized that it should be sent as one parameter like:
-s xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxx -g contosogroup -a contosoaccount -m pytz
so I close the issue.

Update-ModulesInAutomationToLatestVersion not Updating

I came up with the issue that Update-ModulesInAutomationToLatestVersion doesn't update models and failing with "The running command stopped because the preference variable "ErrorActionPreference" or common parameter is set to Stop: The Automation account was not found."

But apparently the script is stopped at
$Modules = Get-AzureRmAutomationModule -ResourceGroupName $ResourceGroupName
-AutomationAccountName $AutomationAccountName

and not modules are retrieved.

even trying to run this from the PS
Azure:/
PS Azure:> Get-AzureRmAutomationModule

cmdlet Get-AzureRmAutomationModule at command pipeline position 1
Supply values for the following parameters:
(Type !? for Help.)
ResourceGroupName: iot
AutomationAccountName: MyAutomation
Get-AzureRmAutomationModule : The Automation account was not found.
At line:1 char:1

  • Get-AzureRmAutomationModule
  • CategoryInfo : CloseError: (:) [Get-AzureRmAutomationModule], ArgumentException
  • FullyQualifiedErrorId : Microsoft.Azure.Commands.Automation.Cmdlet.GetAzureAutomationModule

I have "MyAutomation" Account name created and it's valid.
Any update or fix for this ?

import module title failures

Import-ModuleFromPSGalleryToAutomation.ps1 fails for some modules where the page title does not match the module name, such as AzureAD (where the title is 'Azure Active Directory V2 PowerShell Module - General Availability Release'). Normally the module name is the same as the title, but in some cases it's not. I'll send a PR here in a little bit, but wanted to open the issue just in case I forget.

New-AzureADApplicationKeyCredential throwing Authorization_RequestDenied

while executing New-AzureADApplicationKeyCredential from Azure Automation runbook its throwing error :

Error occurred while executing SetApplication Code: Authorization_RequestDenied Message: Insufficient privileges to complete the operation. RequestId: 59574612-93fa-4e13-b409-4fab03e6fe6f DateTimeStamp: Mon, 22 Jun 2020 11:08:33 GMT HttpStatusCode: Forbidden HttpStatusDescription: Forbidden HttpResponseStatus: Completed (Error occurred while executing SetApplication Code: Authorization_RequestDenied Message: Insufficient privileges to complete the operation. RequestId: 59574612-93fa-4e13-b409-4fab03e6fe6f DateTimeStamp: Mon, 22 Jun 2020 11:08:33 GMT HttpStatusCode: Forbidden HttpStatusDescription: Forbidden HttpResponseStatus: Completed )

I have already provided below API permissions for the Azure application of Automation Account :

image

Source Control defaults to PowerShell 5.1

I have set up a source control integration to automatically pull runbooks from an Azure DevOps repository. However, any new runbooks default to PowerShell 5.1. Is there any way to set the runtime dynamically in the PowerShell code? Or set a default runtime for all new runbooks?

Separately, is there any effort to allow changing runtime after a runbook has been published?

Error in Create-RunAsAccount if Role Assignment Fails

Line 53 has the erroraction on the end of line, but should be moved left of the pipe for the new-azroleassignment, could even remove the write-verbose and pipe altogether.
Otherwise the script error stops and fails to return application id.

In my case the system appears to automatically assign the role and that caused the first new-azroleassignment to return null due to the role already being assigned.

Powershell runbooks on hybrid workers can access other jobs variables if too many jobs are running at the same time

Hi! We have some user onboarding/offboarding scripts that run on hybrid workers. Sometimes, when there are several jobs running at the same time on the same hybrid worker, a script will eventually be able to read data from another job that is running at the same time.

A simplified example:

1 $Var1 = "1"
2 if ($Var1 -eq "1") {
3	$Email = "[email protected]"
4 }
5
6 .\ChildScript.ps1 -parameter1 "something" -parameter2 $Email

In Job 1, $Var1 is "1", so $Email will be created and populated with "[email protected]".

In Job 2, $Var1 is "6", so $Email is never created. It should be $null all along the script.

Expected behavior: In Job 2, line 6 will send nothing in parameter2.
What happens: If there are many jobs running at the same time, sometimes Job 2 will send "[email protected]" on line 6, which is an e-mail that was assigned to $Email in Job 1.

It doesn't happen every time, but we were able to consistently trigger this by sending several jobs (50 to 80) at the same time.

Shouldn't the variables be sandboxed in it's own powershell process?

Additional info, in case it makes any difference:

  • Hybrid workers are extension based and running on Windows Server 2012 R2
  • The real scripts contains several get-aduser and set-aduser commands
  • When $Var1 is "1", there is a connection to an on-premises exchange server via $Session = New-PSSession and Import-PSSession $Session
  • Runtime Version is Powershell 5.1

ReRegisterAutomationSchedule-MS-Mgmt fails when schedule has credential parameters

I can't determine where this script lives. It's not in this repo. It's unclear from its home page at https://www.powershellgallery.com/packages/ReRegisterAutomationSchedule-MS-Mgmt/1.0/DisplayScript

However, that page does say that it's owned by the Azure Automation Team, which I'm assuming is you.

I found a case where it's failing. I have a disabled or "Off" schedule for a runbook.

The script errors out like so:

Get-AzureRmAutomationScheduledRunbook : Invalid JSON primitive: az-resource-manager.
At .\ReRegisterAutomationSchedule-MS-Mgmt.ps1:74 char:14
+ ...    $sItem = Get-AzureRmAutomationScheduledRunbook -AutomationAccount  ...
+                 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    + CategoryInfo          : CloseError: (:) [Get-AzureRmAutomationScheduledRunbook], CmdletInvocationException
    + FullyQualifiedErrorId : Microsoft.Azure.Commands.Automation.Cmdlet.GetAzureAutomationScheduledRunbook

import_py3package_from_pypi does not work anymore

It seems there has been a change on the python 3 environment used by Automation.

Last week I used import_py3package_from_pypi for importing azure-identity and it worked fine, now it doesn't. It fails with:
Traceback (most recent call last): File "C:\WPy64-3800\python-3.8.0.amd64\lib\automationassets.py", line 155, in _issue_request response = urllib.request.urlopen(request) File "C:\WPy64-3800\python-3.8.0.amd64\lib\urllib\request.py", line 222, in urlopen return opener.open(url, data, timeout) File "C:\WPy64-3800\python-3.8.0.amd64\lib\urllib\request.py", line 531, in open response = meth(req, response) File "C:\WPy64-3800\python-3.8.0.amd64\lib\urllib\request.py", line 640, in http_response response = self.parent.error( File "C:\WPy64-3800\python-3.8.0.amd64\lib\urllib\request.py", line 569, in error return self._call_chain(*args) File "C:\WPy64-3800\python-3.8.0.amd64\lib\urllib\request.py", line 502, in _call_chain result = func(*args) File "C:\WPy64-3800\python-3.8.0.amd64\lib\urllib\request.py", line 649, in http_error_default raise HTTPError(req.full_url, code, msg, hdrs, fp)urllib.error.HTTPError: HTTP Error 404: Not FoundDuring handling of the above exception, another exception occurred:Traceback (most recent call last): File "C:\Temp\rwkbzl2s.0mz\fc3f4da0-b392-474b-8049-8403db2e0522", line 127, in <module> token = get_automation_runas_token() File "C:\Temp\rwkbzl2s.0mz\fc3f4da0-b392-474b-8049-8403db2e0522", line 40, in get_automation_runas_token cert = automationassets.get_automation_certificate("AzureRunAsCertificate") File "C:\WPy64-3800\python-3.8.0.amd64\lib\automationassets.py", line 237, in get_automation_certificate certificate = _client.get_certificate_asset(name) File "C:\WPy64-3800\python-3.8.0.amd64\lib\automationassets.py", line 191, in get_certificate_asset return self._issue_request(url, self._GET) File "C:\WPy64-3800\python-3.8.0.amd64\lib\automationassets.py", line 158, in _issue_request raise AutomationAssetNotFound()automationassets.AutomationAssetNotFound

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.