Hi everyone, Please help me, I am writing a script that can rename,join,rejoin,remove remote computer in domain.
I need to verify local user and his password on a remote machine. Here is my function:
Function GetLocalUser
{
#ask to input local admin username
#set it as admin if you press enter
if (($FLuser = Read-Host "Input local username(press enter for admin)") -eq $null) { $FLuser = "admin" }
#ask to input password for local user, it can not be blank
do { $FLPwd = Read-Host "Input"$FLuser"'s password" } while ($FLPwd -eq $null) Write-Host "Verifying..." -BackgroundColor DarkGreen -ForegroundColor Yellow } And now I would like to verify $FLuser and $FLPwd on a remote machine.
}
I am novice in power shell and have got stuck, so please help me.
Thank you.
Best regards, ZamElek