I can run this script locally, but if I try to use invoke-command from another machine, I get a -6 response on the authentication. Any ideas?
[void][System.Reflection.Assembly]::LoadWithPartialName("Utimaco.SafeGuard.AdministrationConsole.Scripting")
$addomain = "DC=domain,dc=com"
[ref]$adstype = ""
[ref]$adsmachine = ""
[ref]$adsuser = ""
[ref]$challengeflags = ""
[ref]$response = ""
$Scripting = new-object -comobject "Utimaco.SafeGuard.AdministrationConsole.Scripting.Base"
$ScriptingDirectory = $Scripting.CreateDirectoryClassInstance()
$ScriptingCR = $Scripting.CreateCRClassInstance()
$Scripting.Initialize()
$Scripting.AuthenticateOfficer("mso", "passwordhere", "")
[void]$ScriptingDirectory.Initialize()
[void]$ScriptingCR.Initialize()
[void]$ScriptingCR.checkchallenge($ccode, $challengeflags)
$ScriptingDirectory.GetOneObject($cname, $addomain, 0, $adsmachine, $adstype)
$ScriptingDirectory.GetOneObject($uname, $addomain, 0, $adsuser, $adstype)
$ScriptingCR.GetChallengeFlags($adsmachine.value, $ccode, $challengeflags)
[void]$ScriptingCR.ComputeResponse($adsuser.value, $adsmachine.value, $ccode, 2, $response)
$responsecode = $response.value
$responsecode = $responsecode.Insert(5,' ').Insert(11,' ').Insert(17,' ').Insert(23,' ').Insert(29,' ').Insert(35,' ').Insert(41,' ').Insert(47,' ').Insert(53,' ').Insert(59,' ').Insert(65,' ')
write-host $responsecode
This thread was automatically locked due to age.