For system, network and cloud administrators

How to verify if the Az PowerShell module is installed and imported

Az stands for the formal Azure PowerShell module containing cmdlets for Azure features. The following PowerShell code will search for the Az module and if it will not find it installed, it will with all of its dependencies. And then, it ill import it into the session.

if (-not (Get-Module Az -ListAvailable)) {
 Install-Module Az -Scope CurrentUser -Force -Verbose
 Import-Module -Name Az -Verbose
}
else { 
 Import-Module -Name Az -Verbose
}

How to create a MongoDB database

Once you’ve installed MongoDB on your system, these are the steps for creating a MongoDB.


How to schedule Windows processes/applications to stop/shutdown via PowerShell

How to schedule Windows processes/applications to stop/shutdown via PowerShell

I wanted to schedule turning off/shutting down Windows processes/applications because as time passes during my day at my computer, I open more and more applications and they get crowded in my workspace. This is why, I decided to create a PowerShell script that I would execute as soon as I’ve opened my computer. A form of a scheduler that stops applications while I’m working at my computer.

And the script is a pretty easy one. Basically, the script consists of 2 commands: one command that tells the script to “wait” X seconds and a 2nd command that will actually stop/shutdown the Windows process/application that you need.


How to view/display a list of all active/running processes/applications in Windows via PowerShell

How to view/display a list of all active/running processes in Windows via PowerShell

Being able to view/display a list of all active/running processes/applications when using Windows via PowerShell has really helped me with my automation tasks, especially when working remotely.


How to stop a Windows process/application via PowerShell

How to stop a Windows application using PowerShell

There comes a time when you’ll need to know how to stop a Windows application (your browser, your chat application, etc.) via the Windows PowerShell. It’s useful when you’re planning on creating scripts to automate tasks. Here we go.