Edit shortcut on App V update (Sequencer 4.6 SP1): I came through a situation where I have to do an update the App V package and need to make changes to Shortcut name like appending the revised version to shortcut name. So I started Modifying an Existing package: And then selected Update Application in Existing […]
User-Defined Aliases using PowerShell Profiles
A Profile is script that runs at startup of the session. The location of the Profile is stored in the $Profile variable, which by default is “My Documents\WindowsPowerShell\Microsoft.PowerShell_profile.ps1″
The Windows PowerShell profile is simply a script file that runs when Windows PowerShell starts up. You can put cmdlets, scripts, functions – any valid Windows PowerShell commands – into this script file. Each time you start Windows PowerShell, this script file will run. That means you can use the profile to set up your Windows PowerShell environment. Typically that would be custom console settings and aliases, but use your imagination and you can come up with other things you’d like to customize in PowerShell before you start working with it.
There is no specific cmdlet set aside for removing a user defined powershell alias, but you can achieve the task by Remove-item.
To remove an alias named “gs”
User-Defined PowerShell Aliases
Syntax to create User-defined alias:
Set-Alias alias command
example:[code] Set-Alias gs Get-Service [/code]
Added a simple button to the page. When the user clicks on the button, we invoke fnAddRows where we get user input from product controls and add them to a HTML table tblProducts. Run the application and you would see the following page Enter product attributes in the input controls as shown below: Click on […]
In PowerShell, an alias is another name assigned to a cmdlet, function, script, executable file, and so on. Just about anything you can run from the PowerShell command prompt can have an alias assigned to it.Windows users can utilize commands like dir, move, type, cls, etc… PowerShell also provides a set of aliases for Linux; ls, pwd, mv, man, cat, etc… PowerShell Aliases are provided for the purpose of allowing new users the ability to quickly interact with the shell. An alias is an alternative name assigned to a cmdlet. For example, “dir” is an alias for “Get-ChildItem.” This tutorial presents two types of aliases:
Built-in Aliases – Predefined alternative names for Windows, Unix, and PowerShell cmdlets.
User-defined Aliases – Custom alternative names created by the user.
Clicking on DeleteAll link will clear all rows from table.