From the course: PowerShell 5 Essential Training
Unlock the full course today
Join today to access over 22,400 courses taught by industry experts or purchase this course individually.
Using parameter attributes - PowerShell Tutorial
From the course: PowerShell 5 Essential Training
Using parameter attributes
- Now taking this scripting solution, we're gonna elevate this to something more useful. Now I always like to test really quick. Now, I test it by running it here. What I really like to do is I want to make sure this is saved, and I want to test it at the Console. Notice this little asterisk over here. That tells you that it hasn't been saved, so you can File, Save. Make sure that it's saved. I'm gonna open up the Console. I always like to test here. Let's go into the Scripts folder, and we'll test it real quick. It was called DiskInfo, so let's run it. DiskInfo, that's perfect. Running great. This is a great solution for me except for one thing. It's getting me this computer's disk space. I'm sure at some point in my infamous IT career, I'm gonna want a different computer. Or I might want to give this script to somebody else, and they're gonna want to use a different computer. Maybe a couple of computers. Well, let's show you how to make this a little bit better. Now, what is…