Skip to content

New-CommanderShortcut

SYNOPSIS

Creates a new desktop shortcut that will run the action.

SYNTAX

New-CommanderShortcut [-Text] <String> [[-Description] <String>] [[-Icon] <String>] [-Action] <ScriptBlock>
 [<CommonParameters>]

DESCRIPTION

Creates a new desktop shortcut that will run the action.

EXAMPLES

EXAMPLE 1

New-CommanderShortcut -Text 'Click Me' -Description 'Nice' -Action {
    Start-Process notepad
}

Creates a shortcut that will start notepad when clicked.

PARAMETERS

-Text

The text to display on the desktop.

Type: System.String
Parameter Sets: (All)
Aliases:

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

-Description

The description shown when hovering the shortcut.

Type: System.String
Parameter Sets: (All)
Aliases:

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

-Icon

The icon to display.

Type: System.String
Parameter Sets: (All)
Aliases:

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

-Action

The action to execute when the shortcut is clicked.

Type: System.Management.Automation.ScriptBlock
Parameter Sets: (All)
Aliases:

Required: True
Position: 4
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

NOTES

Back to top