Start-PowerShellAsAdmin

SYNOPSIS

Starts a porwershell session as an administrator

SYNTAX

Start-PowerShellAsAdmin [-WindowsPowerShell] [-ISE] [[-Credential] <PSCredential>] [-WhatIf] [-Confirm]
 [<CommonParameters>]

DESCRIPTION

Starts a porwershell session as an administrator

EXAMPLES

EXAMPLE 1

An example

PARAMETERS

-WindowsPowerShell

Start powershell 5.1 session. Default is a Powershell 7 session.

Type: SwitchParameter
Parameter Sets: (All)
Aliases:

Required: False
Position: Named
Default value: False
Accept pipeline input: False
Accept wildcard characters: False

-ISE

Start a powershell ISE session.

Type: SwitchParameter
Parameter Sets: (All)
Aliases:

Required: False
Position: Named
Default value: False
Accept pipeline input: False
Accept wildcard characters: False

-Credential

Run session as a different user.

Type: PSCredential
Parameter Sets: (All)
Aliases:

Required: False
Position: 1
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-WhatIf

Shows what would happen if the cmdlet runs. The cmdlet is not run.

Type: SwitchParameter
Parameter Sets: (All)
Aliases: wi

Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-Confirm

Prompts you for confirmation before running the cmdlet.

Type: SwitchParameter
Parameter Sets: (All)
Aliases: cf

Required: False
Position: Named
Default value: None
Accept pipeline input: False
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.

INPUTS

OUTPUTS

System.Void

NOTES

General notes