From the course: Complete Guide to PowerShell 7

Unlock this course with a free trial

Join today to access over 24,500 courses taught by industry experts.

Protecting sensitive information

Protecting sensitive information - PowerShell Tutorial

From the course: Complete Guide to PowerShell 7

Protecting sensitive information

- [Instructor] When working with PowerShell, there'll be times where you'll need to secure a sensitive information. So first off, let's look at credentials. Now, of course, there'll be a point where you will be prompted for credentials. So let's just make up some credentials here and a password, and then we want to be able to store those credentials. If I look inside the credential object and run the selection, you'll see I get the username, but I don't get the password 'cause that's a secure string. Now, we can output these values, and if I kind of run the selection here, this will create me a specific file. So let me say C temp and then I'll say credential. And when I load that, you'll see it's encrypted as this password, but the username is visible. So it's a default option that's there when we actually use get credential because it uses the secure string mechanism to control that. Now, we could go one step further. So let me clear this here. And we could also take that credential…

Contents