It was used for creating new alias.
New-Alias Description :
The New-Alias cmdlet is used for creating new alias in the current session of the Powershell. The alias created by this cmdlet was not saved by default, you need to export the alias to a file and once again you need to import to save it.
New-Alias Syntax :
Parameter Set: Default New-Alias [-Name] <String> [-Value] <String> [-Description <String> ] [-Force] [-Option <ScopedItemOptions> ] [-PassThru] [-Scope <String> ] [-Confirm] [-WhatIf] [ <CommonParameters>]
New-Alias Parameters :
It was used to return the objects that represents the alias.
Use to specify the new alias. Here you can use the alphanumeric characters.
It will act like set-alias cmdlet.
Used for specifying the description.
Used to get the aliases in specified scope. Valid values are “Global”, “Local”, or “Script”, or a number relative to the current scope.
Used to specify the name of the cmdlet.
Sets the value of the Options property of the alias.
It will prompt you for a confirmation before running a cmdlet.
It will show what happens when the cmdlet runs.
-Verbose, -Debug, -ErrorAction, -ErrorVariable, -OutBuffer, -OutVariable.
New-Alias Examples :
1) This command creates an alias named list for replacing the command get-childitem.
PS C:> new-alias list get-childitem