Skip to content

Commit 0ff8a10

Browse files
authored
Merge pull request #232618 from SnehaSudhirG/29Mar-PSPYUpdates
Added new info
2 parents e13449a + 5b72ebf commit 0ff8a10

File tree

2 files changed

+31
-41
lines changed

2 files changed

+31
-41
lines changed

articles/automation/automation-runbook-types.md

Lines changed: 28 additions & 38 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ title: Azure Automation runbook types
33
description: This article describes the types of runbooks that you can use in Azure Automation and considerations for determining which type to use.
44
services: automation
55
ms.subservice: process-automation
6-
ms.date: 12/28/2022
6+
ms.date: 03/29/2023
77
ms.topic: conceptual
88
ms.custom: references_regions
99
---
@@ -35,12 +35,12 @@ The PowerShell version is determined by the **Runtime version** specified (that
3535
The same Azure sandbox and Hybrid Runbook Worker can execute **PowerShell 5.1** and **PowerShell 7.1 (preview)** runbooks side by side.
3636

3737
> [!NOTE]
38-
> - Currently, PowerShell 7.2 (preview) runtime version is supported in five regions for Cloud jobs only: West Central US, East US, South Africa North, North Europe, Australia Southeast
38+
> - Currently, PowerShell 7.2 (preview) runtime version is supported for both Cloud and Hybrid jobs in all Public regions except Australia Central2, Korea South, Sweden South, Jio India Central, Brazil Southeast, Central India, West India, UAE Central, and Gov clouds.
3939
> - At the time of runbook execution, if you select **Runtime Version** as **7.1 (preview)**, PowerShell modules targeting 7.1 (preview) runtime version are used and if you select **Runtime Version** as **5.1**, PowerShell modules targeting 5.1 runtime version are used. This applies for PowerShell 7.2 (preview) modules and runbooks.
4040
4141
Ensure that you select the right Runtime Version for modules.
4242

43-
For example : if you are executing a runbook for a SharePoint automation scenario in **Runtime version** *7.1 (preview)*, then import the module in **Runtime version** **7.1 (preview)**; if you are executing a runbook for a SharePoint automation scenario in **Runtime version** **5.1**, then import the module in **Runtime version** *5.1*. In this case, you would see two entries for the module, one for **Runtime Version** **7.1(preview)** and other for **5.1**.
43+
For example: if you're executing a runbook for a SharePoint automation scenario in **Runtime version** *7.1 (preview)*, then import the module in **Runtime version** **7.1 (preview)**; if you're executing a runbook for a SharePoint automation scenario in **Runtime version** **5.1**, then import the module in **Runtime version** *5.1*. In this case, you would see two entries for the module, one for **Runtime Version** **7.1(preview)** and other for **5.1**.
4444

4545
:::image type="content" source="./media/automation-runbook-types/runbook-types.png" alt-text="runbook Types.":::
4646

@@ -65,7 +65,7 @@ The following are the current limitations and known issues with PowerShell runbo
6565
- Runbooks can't use [parallel processing](automation-powershell-workflow.md#use-parallel-processing) to execute multiple actions in parallel.
6666
- Runbooks can't use [checkpoints](automation-powershell-workflow.md#use-checkpoints-in-a-workflow) to resume runbook if there's an error.
6767
- You can include only PowerShell, PowerShell Workflow runbooks, and graphical runbooks as child runbooks by using the [Start-AzAutomationRunbook](/powershell/module/az.automation/start-azautomationrunbook) cmdlet, which creates a new job.
68-
- Runbooks can't use the PowerShell [#Requires](/powershell/module/microsoft.powershell.core/about/about_requires) statement, it is not supported in Azure sandbox or on Hybrid Runbook Workers and might cause the job to fail.
68+
- Runbooks can't use the PowerShell [#Requires](/powershell/module/microsoft.powershell.core/about/about_requires) statement, it isn't supported in Azure sandbox or on Hybrid Runbook Workers and might cause the job to fail.
6969

7070
**Known issues**
7171

@@ -80,19 +80,19 @@ The following are the current limitations and known issues with PowerShell runbo
8080
**Limitations**
8181

8282
- You must be familiar with PowerShell scripting.
83-
- The Azure Automation internal PowerShell cmdlets are not supported on a Linux Hybrid Runbook Worker. You must import the `automationassets` module at the beginning of your Python runbook to access the Automation account shared resources (assets) functions.
84-
- For the PowerShell 7 runtime version, the module activities are not extracted for the imported modules.
85-
- *PSCredential* runbook parameter type is not supported in PowerShell 7 runtime version.
86-
- PowerShell 7.x does not support workflows. See [this](/powershell/scripting/whats-new/differences-from-windows-powershell#powershell-workflow) for more details.
87-
- PowerShell 7.x currently does not support signed runbooks.
83+
- The Azure Automation internal PowerShell cmdlets aren't supported on a Linux Hybrid Runbook Worker. You must import the `automationassets` module at the beginning of your Python runbook to access the Automation account shared resources (assets) functions.
84+
- For the PowerShell 7 runtime version, the module activities aren't extracted for the imported modules.
85+
- *PSCredential* runbook parameter type isn't supported in PowerShell 7 runtime version.
86+
- PowerShell 7.x doesn't support workflows. See [this](/powershell/scripting/whats-new/differences-from-windows-powershell#powershell-workflow) for more details.
87+
- PowerShell 7.x currently doesn't support signed runbooks.
8888
- Source control integration doesn't support PowerShell 7.1 (preview) Also, PowerShell 7.1 (preview) runbooks in source control gets created in Automation account as Runtime 5.1.
89-
- PowerShell 7.1 module management is not supported through `Get-AzAutomationModule` cmdlets.
89+
- PowerShell 7.1 module management isn't supported through `Get-AzAutomationModule` cmdlets.
9090
- Runbook will fail with no log trace if the input value contains the character '.
9191

9292

9393
**Known issues**
9494

95-
- Executing child scripts using `.\child-runbook.ps1` is not supported in this preview.
95+
- Executing child scripts using `.\child-runbook.ps1` isn't supported in this preview.
9696
**Workaround**: Use `Start-AutomationRunbook` (internal cmdlet) or `Start-AzAutomationRunbook` (from *Az.Automation* module) to start another runbook from parent runbook.
9797
- Runbook properties defining logging preference is not supported in PowerShell 7 runtime.
9898
**Workaround**: Explicitly set the preference at the start of the runbook as below -
@@ -103,7 +103,7 @@ The following are the current limitations and known issues with PowerShell runbo
103103
```
104104
- Avoid importing `Az.Accounts` module to version 2.4.0 version for PowerShell 7 runtime as there can be an unexpected behavior using this version in Azure Automation.
105105
- You might encounter formatting problems with error output streams for the job running in PowerShell 7 runtime.
106-
- When you import a PowerShell 7.1 module that's dependent on other modules, you may find that the import button is gray even when PowerShell 7.1 version of the dependent module is installed. For example, Az.Compute version 4.20.0, has a dependency on Az.Accounts being >= 2.6.0. This issue occurs when an equivalent dependent module in PowerShell 5.1 doesn't meet the version requirements. For example, 5.1 version of Az.Accounts was < 2.6.0.
106+
- When you import a PowerShell 7.1 module that's dependent on other modules, you may find that the import button is gray even when PowerShell 7.1 version of the dependent module is installed. For example, Az.Compute version 4.20.0, has a dependency on Az.Accounts being >= 2.6.0. This issue occurs when an equivalent dependent module in PowerShell 5.1 doesn't meet the version requirements. For example, 5.1 version of Az.Accounts were < 2.6.0.
107107
- When you start PowerShell 7 runbook using the webhook, it auto-converts the webhook input parameter to an invalid JSON.
108108

109109

@@ -112,18 +112,17 @@ The following are the current limitations and known issues with PowerShell runbo
112112
**Limitations**
113113

114114
> [!NOTE]
115-
> Currently, PowerShell 7.2 (preview) runtime version is supported in five regions for Cloud jobs only: West Central US, East US, South Africa North, North Europe, and Australia Southeast.
115+
> Currently, PowerShell 7.2 (preview) runtime version is supported for both Cloud and Hybrid jobs in all Public regions except Australia Central2, Korea South, Sweden South, Jio India Central, Brazil Southeast, Central India, West India, UAE Central, and Gov clouds.
116116
117117
- You must be familiar with PowerShell scripting.
118-
- For the PowerShell 7 runtime version, the module activities are not extracted for the imported modules.
119-
- *PSCredential* runbook parameter type is not supported in PowerShell 7 runtime version.
120-
- PowerShell 7.x does not support workflows. See [this](/powershell/scripting/whats-new/differences-from-windows-powershell#powershell-workflow) for more details.
121-
- PowerShell 7.x currently does not support signed runbooks.
122-
- Source control integration doesn't support PowerShell 7.2 (preview). Also, PowerShell 7.2 (preview) runbooks in source control gets created in Automation account as Runtime 5.1.
123-
- Currently, only cloud jobs are supported for PowerShell 7.2 (preview) runtime versions.
118+
- For the PowerShell 7 runtime version, the module activities aren't extracted for the imported modules.
119+
- *PSCredential* runbook parameter type isn't supported in PowerShell 7 runtime version.
120+
- PowerShell 7.x doesn't support workflows. See [this](/powershell/scripting/whats-new/differences-from-windows-powershell#powershell-workflow) for more details.
121+
- PowerShell 7.x currently doesn't support signed runbooks.
122+
- Source control integration doesn't support PowerShell 7.2 (preview). Also, PowerShell 7.2 (preview) runbooks in source control get created in Automation account as Runtime 5.1.
124123
- Logging job operations to the Log Analytics workspace through linked workspace or diagnostics settings are not supported.
125-
- Currently, PowerShell 7.2 (preview) runbooks are only supported from Azure portal. Rest API and PowerShell is not supported.
126-
- Az module 8.3.0 is installed by default and cannot be managed at the automation account level. Use custom modules to override the Az module to the desired version.
124+
- Currently, PowerShell 7.2 (preview) runbooks are only supported from Azure portal. Rest API and PowerShell isn't supported.
125+
- Az module 8.3.0 is installed by default and can't be managed at the automation account level. Use custom modules to override the Az module to the desired version.
127126
- The imported PowerShell 7.2 (preview) module would be validated during job execution. Ensure that all dependencies for the selected module are also imported for successful job execution.
128127
- PowerShell 7.2 module management is not supported through `Get-AzAutomationModule` cmdlets.
129128

@@ -166,12 +165,7 @@ PowerShell Workflow runbooks are text runbooks based on [Windows PowerShell Work
166165

167166
Python runbooks compile under Python 2, Python 3.8 (preview) and Python 3.10 (preview). You can directly edit the code of the runbook using the text editor in the Azure portal. You can also use an offline text editor and [import the runbook](manage-runbooks.md) into Azure Automation.
168167

169-
* Python 3.10 (preview) runbooks are currently supported in five regions for cloud jobs only:
170-
- West Central US
171-
- East US
172-
- South Africa North
173-
- North Europe
174-
- Australia Southeast
168+
Currently, Python 3.10 (preview) runtime version is supported for both Cloud and Hybrid jobs in all Public regions except Australia Central2, Korea South, Sweden South, Jio India Central, Brazil SouthEast, Central India, West India, UAE Central, and Gov clouds.
175169

176170
### Advantages
177171

@@ -193,7 +187,7 @@ Following are the limitations of Python runbooks
193187
# [Python 2.7](#tab/py27)
194188

195189
- You must be familiar with Python scripting.
196-
- For Python 2.7.12 modules use wheel files cp27-amd6.
190+
- For Python 2.7.12 modules, use wheel files cp27-amd6.
197191
- To use third-party libraries, you must [import the packages](python-packages.md) into the Automation account.
198192
- Azure Automation doesn't support **sys.stderr**.
199193
- The Python **automationassets** package is not available on pypi.org, so it's not available for import onto a Windows machine.
@@ -206,33 +200,29 @@ Following are the limitations of Python runbooks
206200
- To use third-party libraries, you must [import the packages](python-packages.md) into the Automation account.
207201
- Using **Start-AutomationRunbook** cmdlet in PowerShell/PowerShell Workflow to start a Python 3.8 (preview) runbook (preview) doesn't work. You can use **Start-AzAutomationRunbook** cmdlet from Az.Automation module or **Start-AzureRmAutomationRunbook** cmdlet from AzureRm.Automation module to work around this limitation. 
208202
- Azure Automation doesn't support **sys.stderr**.
209-
- The Python **automationassets** package is not available on pypi.org, so it's not available for import onto a Windows machine.
203+
- The Python **automationassets** package isn't available on pypi.org, so it's not available for import onto a Windows machine.
210204

211205
# [Python 3.10 (preview)](#tab/py10)
212206

213207
**Limitations**
214208

215-
- For Python 3.10 (preview) modules, currently, only the wheel files targeting cp310 Linux OS are supported. [Learn more](./python-3-packages.md)
216-
- Currently, only cloud jobs are supported for Python 3.10 (preview) runtime versions.
217-
- Custom packages for Python 3.10 (preview) are only validated during job runtime. Job is expected to fail if the package is not compatible in the runtime or if required dependencies of packages are not imported into automation account.
218-
- Currently, Python 3.10 (preview) runbooks are only supported from Azure portal. Rest API and PowerShell is not supported.
209+
- For Python 3.10 (preview) modules, currently, only the wheel files targeting cp310 Linux OS are supported. [Learn more](./python-3-packages.md).
210+
- Custom packages for Python 3.10 (preview) are only validated during job runtime. Job is expected to fail if the package is not compatible in the runtime or if necessary dependencies of packages are not imported into automation account.
211+
- Currently, Python 3.10 (preview) runbooks are only supported from Azure portal. Rest API and PowerShell isn't supported.
219212

220213
---
221214

222215
### Multiple Python versions
223216

224-
It is applicable for Windows Hybrid workers. For a Windows Runbook Worker, when running a Python 2 runbook it looks for the environment variable `PYTHON_2_PATH` first and validates whether it points to a valid executable file. For example, if the installation folder is `C:\Python2`, it would check if `C:\Python2\python.exe` is a valid path. If not found, then it looks for the `PATH` environment variable to do a similar check.
217+
It's applicable for Windows Hybrid workers. For a Windows Runbook Worker, when running a Python 2 runbook it looks for the environment variable `PYTHON_2_PATH` first and validates whether it points to a valid executable file. For example, if the installation folder is `C:\Python2`, it would check if `C:\Python2\python.exe` is a valid path. If not found, then it looks for the `PATH` environment variable to do a similar check.
225218

226219
For Python 3, it looks for the `PYTHON_3_PATH` env variable first and then falls back to the `PATH` environment variable.
227220

228221
When using only one version of Python, you can add the installation path to the `PATH` variable. If you want to use both versions on the Runbook Worker, set `PYTHON_2_PATH` and `PYTHON_3_PATH` to the location of the module for those versions.
229222

230223
### Known issues
231224

232-
For cloud jobs, Python 3.8 jobs sometimes fail with an exception message `invalid interpreter executable path`. You might see this exception if the job is delayed, starting more than 10 minutes, or using **Start-AutomationRunbook** to start Python 3.8 runbooks. If the job is delayed, restarting the runbook should be sufficient. Hybrid jobs should work without any issue if using the following steps:
233-
234-
1. Create a new environment variable called `PYTHON_3_PATH` and specify the installation folder. For example, if the installation folder is `C:\Python3`, then this path needs to be added to the variable.
235-
1. Restart the machine after setting the environment variable.
225+
For cloud jobs, Python 3.8 jobs sometimes fail with an exception message `invalid interpreter executable path`. You might see this exception if the job is delayed, starting more than 10 minutes, or using **Start-AutomationRunbook** to start Python 3.8 runbooks. If the job is delayed, restarting the runbook should be sufficient.
236226

237227
## Graphical runbooks
238228

articles/automation/python-3-packages.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ title: Manage Python 3 packages in Azure Automation
33
description: This article tells how to manage Python 3 packages (preview) in Azure Automation.
44
services: automation
55
ms.subservice: process-automation
6-
ms.date: 10/26/2022
6+
ms.date: 03/29/2023
77
ms.topic: conceptual
88
ms.custom: has-adal-ref, references_regions, devx-track-azurepowershell
99
---
@@ -81,8 +81,8 @@ Perform the following steps using a 64-bit Linux machine with Python 3.10.x and
8181
1. On the **Add Python Package** page, select a local package to upload. The package can be a **.whl** or **.tar.gz** file for Python 3.8 (preview) and **.whl** file for Python 3.10 (preview).
8282
1. Enter a name and select the **Runtime Version** as Python 3.8 (preview) or Python 3.10 (preview).
8383
> [!NOTE]
84-
> Python 3.10 (preview) runtime version is currently supported in five regions for Cloud jobs only: West Central US, East US, South Africa North, North Europe, Australia Southeast.
85-
1. Select **Import**
84+
> Currently, Python 3.10 (preview) runtime version is supported for both Cloud and Hybrid jobs in all Public regions except Australia Central2, Korea South, Sweden South, Jio India Central, Brazil Southeast, Central India, West India, UAE Central, and Gov clouds.
85+
1. Select **Import**.
8686

8787
:::image type="content" source="media/python-3-packages/upload-package.png" alt-text="Screenshot shows the Add Python 3.8 (preview) Package page with an uploaded tar.gz file selected.":::
8888

0 commit comments

Comments
 (0)