Skip to content

Commit 139fa02

Browse files
Merge pull request #233292 from SnehaSudhirG/04Apr-KnownIssues
Updated Known issues section
2 parents 53ee60c + 4ddb7d6 commit 139fa02

File tree

1 file changed

+17
-1
lines changed

1 file changed

+17
-1
lines changed

articles/automation/automation-runbook-types.md

Lines changed: 17 additions & 1 deletion
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: 03/29/2023
6+
ms.date: 04/04/2023
77
ms.topic: conceptual
88
ms.custom: references_regions
99
---
@@ -73,6 +73,20 @@ The following are the current limitations and known issues with PowerShell runbo
7373
* PowerShell runbooks can't retrieve a variable asset with `*~*` in the name.
7474
* A [Get-Process](/powershell/module/microsoft.powershell.management/get-process) operation in a loop in a PowerShell runbook can crash after about 80 iterations.
7575
* A PowerShell runbook can fail if it tries to write a large amount of data to the output stream at once. You can typically work around this issue by having the runbook output just the information needed to work with large objects. For example, instead of using `Get-Process` with no limitations, you can have the cmdlet output just the required parameters as in `Get-Process | Select ProcessName, CPU`.
76+
* When you use [ExchangeOnlineManagement](https://learn.microsoft.com/powershell/exchange/exchange-online-powershell?view=exchange-ps) module version: 3.0.0 or higher, you may experience errors. To resolve the issue, ensure that you explicitly upload [PowerShellGet](https://learn.microsoft.com/powershell/module/powershellget/?view=powershell-5.1) and [PackageManagement](https://learn.microsoft.com/powershell/module/packagemanagement/?view=powershell-5.1) modules as well.
77+
* When you use [New-item cmdlet](https://learn.microsoft.com/powershell/module/microsoft.powershell.management/new-item?view=powershell-5.1), jobs might be suspended. To resolve the issue, follow the mitigation steps:
78+
1. Consume the output of `new-item` cmdlet in a variable and **do not** write it to the output stream using `write-output` command.
79+
- You can use debug or progress stream after you enable it from **Logging and Tracing** setting of the runbook.
80+
```powershell-interactive
81+
$item = New-Item -Path ".\message.txt" -Force -ErrorAction SilentlyContinue
82+
write-debug $item # or use write-progress $item
83+
```
84+
- Alternatively, you can check if variable is nonempty if required to do so in the script.
85+
```powershell-interactive
86+
$item = New-Item -Path ".\message.txt" -Force -ErrorAction SilentlyContinue
87+
if($item) { write-output "File Created" }
88+
```
89+
1. You can also upgrade your runbooks to PowerShell 7.1 or PowerShell 7.2 where the same runbook will work as expected.
7690
7791
7892
# [PowerShell 7.1 (preview)](#tab/lps71)
@@ -105,6 +119,7 @@ The following are the current limitations and known issues with PowerShell runbo
105119
- You might encounter formatting problems with error output streams for the job running in PowerShell 7 runtime.
106120
- 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.
107121
- When you start PowerShell 7 runbook using the webhook, it auto-converts the webhook input parameter to an invalid JSON.
122+
- We recommend that you use [ExchangeOnlineManagement](https://learn.microsoft.com/powershell/exchange/exchange-online-powershell?view=exchange-ps) module version: 3.0.0 or lower because version: 3.0.0 or higher may lead to job failures.
108123
109124
110125
# [PowerShell 7.2 (preview)](#tab/lps72)
@@ -137,6 +152,7 @@ The following are the current limitations and known issues with PowerShell runbo
137152

138153
$ProgressPreference = "Continue"
139154
```
155+
- When you use [ExchangeOnlineManagement](https://learn.microsoft.com/powershell/exchange/exchange-online-powershell?view=exchange-ps) module version: 3.0.0 or higher, you can experience errors. To resolve the issue, ensure that you explicitly upload [PowerShellGet](https://learn.microsoft.com/powershell/module/powershellget/?view=powershell-7.3) and [PackageManagement](https://learn.microsoft.com/powershell/module/packagemanagement/?view=powershell-7.3) modules.
140156
---
141157
142158
## PowerShell Workflow runbooks

0 commit comments

Comments
 (0)