Get-HomeDrive
SYNOPSIS
Retrieves the home drive path for an Active Directory user.
SYNTAX
DESCRIPTION
The `Get-HomeDrive` function retrieves the home drive path for a specified Active Directory user. It checks the user's `homeDirectory` attribute and resolves the full path if the home drive is mapped to a specific location. The function also validates the existence of the home drive path.
EXAMPLES
EXAMPLE 1
Retrieves the home drive path for the user "jdoe."
EXAMPLE 2
Retrieves the home drive path for the user "John Doe" using their distinguished name.
PARAMETERS
-Identity
The identity of the Active Directory user (e.g., DistinguishedName, SamAccountName, or UserPrincipalName).
Type: String
Parameter Sets: (All)
Aliases: DistinguishedName, DN, sAMAccountName, User, UserPrincipalName
Required: True
Position: 1
Default value: None
Accept pipeline input: True (ByPropertyName, ByValue)
Accept wildcard characters: False
CommonParameters
This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutVariable, -OutBuffer, -PipelineVariable, -Verbose, -WarningAction, and -WarningVariable. For more information, see about_CommonParameters.