Skip to content

Commit 1d9b514

Browse files
Merge pull request #263873 from TimShererWithAquent/graphps34
Bulk update | 174285 MS Graph PowerShell cmdlet update Phase 3
2 parents b22bb31 + ee54766 commit 1d9b514

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

articles/automation/troubleshoot/hybrid-runbook-worker.md

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ description: This article tells how to troubleshoot and resolve issues that aris
44
services: automation
55
ms.date: 09/17/2023
66
ms.topic: troubleshooting
7-
ms.custom: linux-related-content, has-azure-ad-ps-ref
7+
ms.custom: linux-related-content, has-azure-ad-ps-ref, azure-ad-ref-level-one-done
88
---
99

1010
# Troubleshoot agent-based Hybrid Runbook Worker issues in Automation
@@ -339,7 +339,7 @@ Hybrid workers send [Runbook output and messages](../automation-runbook-output-a
339339

340340
#### Issue
341341

342-
A script running on a Windows Hybrid Runbook Worker can't connect as expected to Microsoft 365 on an Orchestrator sandbox. The script is using [Connect-MsolService](/powershell/module/msonline/connect-msolservice) for connection.
342+
A script running on a Windows Hybrid Runbook Worker can't connect as expected to Microsoft 365 on an Orchestrator sandbox. The script is using [Connect-MgGraph](/powershell/microsoftgraph/authentication-commands#using-connect-mggraph) for connection.
343343

344344
If you adjust **Orchestrator.Sandbox.exe.config** to set the proxy and the bypass list, the sandbox still doesn't connect properly. A **Powershell_ise.exe.config** file with the same proxy and bypass list settings seems to work as you expect. Service Management Automation (SMA) logs and PowerShell logs don't provide any information about proxy.​
345345

@@ -349,14 +349,14 @@ The connection to Active Directory Federation Services (AD FS) on the server can
349349

350350
#### Resolution
351351

352-
You can resolve the issue for the Orchestrator sandbox by migrating your script to use the Microsoft Entra modules instead of the MSOnline module for PowerShell cmdlets. For more information, see [Migrating from Orchestrator to Azure Automation (Beta)](../automation-orchestrator-migration.md).
352+
You can resolve the issue for the Orchestrator sandbox by migrating your script to use the Microsoft Entra modules instead of the PowerShell cmdlets. For more information, see [Migrating from Orchestrator to Azure Automation (Beta)](../automation-orchestrator-migration.md).
353353

354-
​If you want to continue to use the MSOnline module cmdlets, change your script to use [Invoke-Command](/powershell/module/microsoft.powershell.core/invoke-command). Specify values for the `ComputerName` and `Credential` parameters.
354+
​If you want to continue to use the module cmdlets, change your script to use [Invoke-Command](/powershell/module/microsoft.powershell.core/invoke-command). Specify values for the `ComputerName` and `Credential` parameters.
355355

356356
```powershell
357357
$Credential = Get-AutomationPSCredential -Name MyProxyAccessibleCredential​
358358
Invoke-Command -ComputerName $env:COMPUTERNAME -Credential $Credential
359-
{ Connect-MsolService … }​
359+
{ Connect-MgGraph … }​
360360
```
361361

362362
This code change starts an entirely new PowerShell session under the context of the specified credentials. It should enable the traffic to flow through a proxy server that's authenticating the active user.

0 commit comments

Comments
 (0)