0
나는 아래의 코드를 사용하여 로컬 사용자 자격 증명을 확인하는 것을 시도하고있다 :로컬 사용자 자격 증명을 확인 2012 서버
Add-Type -AssemblyName System.DirectoryServices.AccountManagement
$DS = New-Object System.DirectoryServices.AccountManagement.PrincipalContext('machine',$ComputerName)
$status=$DS.ValidateCredentials($UserName, $Password)
나는 아래의 오류가 점점 오전 :
Exception calling "ValidateCredentials" with "2" argument(s): "The specified network name is no longer available.
"
At line:1 char:1
+ $ds.ValidateCredentials('User','Password')
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+ CategoryInfo : NotSpecified: (:) [], MethodInvocationException
+ FullyQualifiedErrorId : PrincipalOperationException
가 좀 도와주세요 이것을 고쳐라. 사전에
덕분에
참고 : 나는 모든 기계에서이 오류를 받고 있지 않다. 87 대의 컴퓨터 중 12 대의 컴퓨터에서만이 오류가 발생합니다.
고정? –
예, 서버가 ping을 실행 중입니다. 이 명령은 서버 자체 내에서 실행됩니다. – Venkatakrishnan
[코드의 다른 문제는이 질문에 답변] (http://stackoverflow.com/questions/19911042/powershell-local-credential-verification) – TravisEz13