SynopsisRemoves automatic logon configuration from a local or remote computer.
- Remove-AutoLogon [-ComputerName] [-Credential]
DescriptionThe Remove-Autologon cmdlet removes the automatic logon configuration from a computer. If autolock has been configured with the Set-AutoLogon cmdlet, it will also be removed.
- ComputerName The computer against which to run the cmdlet. By default this parameter will be populated with the name of the local computer.
- Credential The credentials under which to run the cmdlet. By default this cmdlet will run as the current user. Using this parameter and the Get-PSCredential cmdlet you can specify an alternate set of credentials under which to execute this command.
InputsRemove-Autologon accepts pipeline input only for the ComputerName parameter and requires that the input object contain a property named either Computer, CN or ComputerName.
OutputsRemove-Autologon makes changes directly to the Windows registry and does not output any Powershell objects.
NotesThe Remove-Autologon cmdlet requires that the RPC service is started on the computer it is trying to access and that DNS services are available to resolve target host names.
Example 1This command will clear any auto lock and automatic logon settings from the registry of the local computer:
Example 2This command will clear any auto lock and automatic logon settings from the registry of remote computer PC02:
C:\PS>Remove-Autologon -Computer PC02