on-internet
← Community

how to authenticate domain credential in powershell script

Stack Overflow ·

I have a powershell script which validate multiple tests in each windows image. But the below specific test require domain credentials to be used to run successfully when I use this script! Can anyone help me to fix ? if (($ImageName -like "*dev*") -or ($ImageName -like "*bare*")) { #$ADE1 = Invoke-Expression ('C:\ade\bin\ade.exe | select-string -pattern "begintrans"') | out-string ; $ADE = $ADE1.trim().split("")[1] Invoke-Expression ('C:\ade\bin\ade.exe | select-string -pattern "begintrans"') > C:\Temp\ade_check.txt $ADE1 = Get-Content C:\Temp\ade_check.txt | Select-String "begintrans" | out-

Comments

Sign in or sign up to comment and upvote.

No comments yet.