Remove PowerShell Universal Login

We have gone to Azure AD Login, and want to disable to login form since it will just accept admin with any password. We want to see if there is a way to just have the users use Azure AD, and remove the login form completely.

Thank you!

Yeah, just edit the forms login method and remove the admin login.

can you share like example code ?

You can just do this in the authentication.ps1 file:

Set-PSUAuthenticationMethod -ScriptBlock { 
param(
    [PSCredential]$Credential
)

$Result = [Security.AuthenticationResult]::new()
$Result.Success = $false 
$Result
 }

It won’t hide the login page but will prevent the login from succeeding.

1 Like

Hey. Did you ever find out how to remove the login page?