If you are trying to invoke powershell commands from a client machine, failure to configure WINRM client to trust the exchange server residing on the remote will result in following error: Connecting to remote server failed with the following error message : The WinRM client cannot process the request. If the authentication scheme is different […]
In this article, I will explain how to create mailbox for existing users. Again this could be done achieved using powershell commands. Prerequisites: In order to execute or invoke powershell commands, we need to download Windows Management Framework. You can download it from following link. http://www.microsoft.com/en-us/download/details.aspx?id=34595 Assembly References: Since we are using system automation API, […]
It is a time-saver to automate creation of mailboxes and active directory accounts for new or existing employees. It is really disappointing that we have to use powershell commands to create mailboxes in exchange. I was really hoping that Microsoft should have exposed this through exchange web services. Prerequisites: In order to execute or invoke […]
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]