0

I want to automate logon process for multiple devices (managed by Intune, Azure Active Directory only) that use different username/password combinations. Is there a way somehow via Powershell script to get the user's password? I would then use those user's credentials to store registry keys:

$RegKeyPathWinLogon = "HKLM:\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Winlogon"
Set-ItemProperty -Path $RegKeyPathWinLogon -Name "AutoAdminLogon" -Value "1"
Set-ItemProperty -Path $RegKeyPathWinLogon -Name "DefaultUserName" -Value "$Username"
Set-ItemProperty -Path $RegKeyPathWinLogon -Name "DefaultPassword" -Value "$Password"
Ljubisa Livac
  • 819
  • 3
  • 13
  • 38
  • This might be of use: [Get current user's credentials object in Powershell without prompting - Stack Overflow](https://stackoverflow.com/a/64615504/3165737) – DocZerø Mar 17 '22 at 14:17
  • Yes, I've read exactly that question and tried with commands suggested, but unfortunately, nothing is returned - data is empty. – Ljubisa Livac Mar 20 '22 at 08:08

0 Answers0