I am trying to onboard multiple Windows Server machines in my on-premise infrastructure to Azure Arc for the purpose of automating patch management. Because there are multiple servers in this scenario the idea is to onboard them using a script that would be deployed via GPO.
The problem occurs when I run the script DeployGPO.ps1. Here are the parameters of the script:
-DomainFQDN int.domain.local -ReportServerFQDN int.domain.local -ArcRemoteShare "DOMAIN\Install\Packages\Azure Arc Agent" -ServicePrincipalSecret "xyzxyz-xyzxyz-xyzxyzxyz-xyzxyzxyz" -ServicePrincipalClientId "abcabcabc-abcabcabc-abcabc" -SubscriptionId "123abc-123abc-123abc" -ResourceGroup "rg-azurearc-prod-we" -Location "westeurope" -TenantId "xxxxx-yyyy-zzzz-wwww" There following error occurs:
The script failed due to call depth overflow. + CategoryInfo : InvalidOperation: (0:Int32) [], ParentContainsErrorRecordException + FullyQualifiedErrorId : CallDepthOverflow All help is welcome!