Running on a Domain Controller causes Exception calling "Translate"

I had SCCM deploy something to my all servers collection which worked perfectly except on Domain Controllers… No logs were created and no errors in the Event Viewer. Running the EXE manually wouldn’t even open PowerShell. I eventually ran Deploy-Application.ps1 to get this error message:

C:\Tmp\Deploy-Application.ps1 : Module [C:\Tmp\AppDeployToolkit\AppDeployToolkitMain.ps1] failed to load:
Exception calling "Translate" with "1" argument(s): "Some or all identity references could not be translated."

At C:\Tmp\Deploy-Application.ps1:98 char:81
+ ... yToolkitMain -DisableLogging } Else { . $moduleAppDeployToolkitMain }
+                                           ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
At line:1 char:1
+ .\Deploy-Application.ps1
+ ~~~~~~~~~~~~~~~~~~~~~~~~
    + CategoryInfo          : NotSpecified: (:) [Write-Error], WriteErrorException
    + FullyQualifiedErrorId : Microsoft.PowerShell.Commands.WriteErrorException,Deploy-Application.ps1

The line 98 that its referring to has to do with “Dot source the required App Deploy Toolkit Functions”… if I try to dot source the AppDeployToolkitMain.ps1 file, it completes but give this error:

Exception calling "Translate" with "1" argument(s): "Some or all identity references could not be translated."
At C:\Tmp\AppDeployToolkit\AppDeployToolkitMain.ps1:270 char:1
+ [string]$LocalPowerUsersGroup = (New-Object -TypeName System.Security ...
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    + CategoryInfo          : NotSpecified: (:) [], MethodInvocationException
    + FullyQualifiedErrorId : IdentityNotMappedException

If I look at line 270 of AppDeployToolkitMain.ps1, its trying to get the BuiltinPowerUsersSid but this is a Domain Controllers, so groups like Power Users and Administrators are hidden.

2 Likes

Running on a Domain Controller causes Exception calling “Translate” · Issue #618 · PSAppDeployToolkit/PSAppDeployToolkit (github.com)

1 Like

@SeanBcaw thanks for this post! Just discovered this today where I was leveraging PSADT v3.8.4 on DC’s. Cheers @luki1412 for fixing that up :slight_smile: