This cmdlet is part of the Vexasoft Cmdlet Library. You can download it now or click here to find out more.
Get-AutoLogon
Synopsis
Gets the automatic logon settings of a local or remote computer.Syntax
- Get-AutoLogon [-ComputerName] [-Credential]
Description
The Get-Autologon cmdlet is used to retrieve the autologon information from a local or remote computer. By default Windows computers do not have autologon configured. If autologon is not configured on the target machine this cmdlet returns no objects.Parameters
- 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.
Inputs
Get-AutoLogon accepts pipeline input only for the ComputerName parameter and requires that the input object contain a property named either Computer, CN or ComputerName.Outputs
Get-AutoLogon outputs a custom Vexasoft.AutoLogon object detailing the autologon details of the target computer.Notes
The Get-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 1
This command will retrieve the autologon configuration and settings for the local computer:C:\PS>Get-AutoLogon
Example 2
Identical to the first example but aimed at a remote machine, this command will retrieve the autologon configuration and settings for the computer PC01:C:\PS>Get-AutoLogon -Computer PC01