Validating user input

Using regular expression (regex) Combine it with a DO loop Once you start making Powershell scripts, it doesn't take long to realize that you'll want to confirm some actions taken by your script before the action is taken. Today I'm going to show you two approaches for it. Using regular expression (regex)  Regular expression or … Continue reading Validating user input

Using secure passwords in your Powershell scripts

Generate a secure string Convert it to an encrypted string Create and set a PSCredential object System administrators often need to deal with credentials, an IT infrastructure is about security, that's one of the root reasons for any enterprise to have it implemented. Powershell has a great way to easily secure your passwords, then you … Continue reading Using secure passwords in your Powershell scripts

How to create Popups with Powershell

Finding the ProgID Create an instance of a COM object Using Popup method Improve it with a script See it in action Bottom Line Component Object Model is a platform-independent, distributed, object-oriented system for creating binary software components that can interact, COM was replaced for .NET, despite this, it remains as a viable technology with important legacy … Continue reading How to create Popups with Powershell

How to block input with Powershell

Find C# function signature Code review Full script Powershell has many built-in cmdlets that allows us to automate our environment, but sometimes we need even more. For that, there's a powerful cmdlet which we've already used here in another article, called "Add-Type" which is capable of adding a .NET class into a powershell session, and … Continue reading How to block input with Powershell