I’m sorry that i was so quite the last few weeks. There was a lot to do. Furthermore I tried to enjoy the sun as often as possible ๐ But I’ll still try it hard to post more frequently.
Just a short PowerShell รรรดTrick which will save you a lot of time ๐
A lot of Cmdlets need the right credentials to perform a action. Especially with W2008R2 and the AD-Cmdlets or with Exchange 2010 this is handy. So you can either type your username/password every time, or just save it to a variable.
$cred = Get-Credential
After hitting Enter a Pop-Up appears where you can enter your credentials. They will be saved within the variable
The input isn’t validated. It’s just saved within the variable for later processing. And don’t worry, the password isn’t saved as clear text ๐
You can also fill the prompt with a username by using “Get-Credential <Username>”. This is maybe helpful when using that in a script.
You can also use this Pop-Up Mechanism directly in a command.
So have fun playing around with PowerShell ๐
May the Shell be with you J
Leave a Reply