Often I find myself needing to run an elevated cmdlet with a different account than what I’m logged in with. In the past, I would use the Get-Credential cmdlet at the start of my script. But that causes a pause within the script, and unnecessary keystrokes. With the Import-CliXML cmdlet, PowerShell now provides an easier way to store credentials and use them for multiple uses.
↧