Skip to Main Content
PowerShell in Depth
book

PowerShell in Depth

by Don Jones, Jeffery Hicks, Richard Siddaway
February 2013
Intermediate to advanced content levelIntermediate to advanced
632 pages
20h 20m
English
Manning Publications
Content preview from PowerShell in Depth

Chapter 12. Working with credentials

This chapter covers

  • Creating a credential object
  • Using credentials
  • Supporting alternative credentials in your scripts

A great many PowerShell commands have a –credential parameter. You can view the list by typing

Get-Help * -Parameter Credential

When you use this parameter, it generally allows the command to operate with the username and password you provide rather than the one you used to log on to the shell. It’s a great way to enable the principle of least privilege: Do as much work as you can with unprivileged credentials, but when more privilege is required, specify alternative credentials for that purpose. You’ll need to run PowerShell with elevated privileges (“Run as Administrator”) to complete ...

Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Start your free trial

You might also like

PowerShell in Depth, Second Edition

PowerShell in Depth, Second Edition

Don Jones, Richard Siddaway, Jeffery Hicks
PowerShell in Practice

PowerShell in Practice

Richard Siddaway

Publisher Resources

ISBN: 9781617290558Publisher SupportOtherPublisher WebsiteSupplemental ContentPurchase Link