Use PowerShell function to check if servers are accessible

Recently I had to check quickly if all of managed servers are accessible. As SCOM monitoring wasn’t set yet in my environment I had to create simple script to do that. One of the easiest method to check if server is up is to test availability of network share. Test-Path There are many ways to check if server is accessible like for example using ping, checking some specific service but …

Get Application Pools using PowerShell function

Getting Application Pools status remotely is relatively easy. Adding them into a data table and then sending it in html formatted report is more complex process. Today I would like to show how to do this by breaking apart one of my functions. In one of the previous articles I described how to get status of application pools and additionally reset IIS if needed – link. This time we just …

How to find events about software uninstallation?

Recently we noticed that some software has been uninstalled on our machines. To scan all servers I created simple PowerShell function which checks event in application log. To scan events we can use Get-EventLogcommand and specify event Id – in this case it should be 1034: Script will generate output with the following information: – Server – Date – User – Application – Version – Manufacturer – Source Usage: Output: …

Get restricted groups from GPO

Today I want to share you my function which will show you how to get restricted groups from GPO. In big Active Directory environments access to servers and workstations are usually managed by AD groups and group policies. Script which I prepared can help administrators to find which restricted groups have an acccess to servers/workstations in specific OU. How script works? Script is checking for all of the GPOs which …

Get Microsoft Monitoring Agent settings remotely

Today I want to show you how to get Microsoft Monitoring Agent settings remotely using PowerShell function. This might be useful when you need to scan all servers in large scale environment to determine that configuration has been set properly. The Microsoft Monitoring Agent The Microsoft Monitoring Agent is a service used to watch and report on application and system health on a Windows computer. The Microsoft Monitoring Agent collects …

Get installed software on your machine

Today’s post will show how to get installed software on your machine. In one of my previous articles I show you script for uninstall of application. But what if you want only check when software was installed or how to uninstall it? This article for sure will help you! Function which I prepared is checking registry for all profiles created on machine and get installed software by command Get-ItemProperty, which …

Use PowerShell to generate token bloat report

Today you will find out how to create token bloat report and send it to specified email address. If you are working in large scale environment you may find this useful. There is often a situation when some user is complaining that he is unable to access some corporate applications. After short investigation you can find that one of the reason for that might be large number of group membership. …

Create-Table function – working with Data Tables in PowerShell

In this article, I will share with you one of the PowerShell modules I wrote for myself which I use every day for daily tasks and in my other scripts to simplify working with data and presenting them in the script or export to CSV, Excel, etc. The module is based on .NET Framework class “System.Data”. To create and work with a table containing a data you can use a …

How to check SCOM Maintenance Mode history (version 2)?

Few months ago I added here simple script for checking SCOM maintenance mode history – link. I decided to adjust it a little bit and convert it into more advanced function. To get SCOM maintenance mode history remotely for some specific server basically we can run just this command: Usage: Function will create an object for each server and add it to $Results array. Object will contains the following properties: …

Use PowerShell function to get reboot details remotely

In this article you will find useful function which will help you get reboot details from remote machines. Script use Get-WinEvent command to find reboot related log entries. Additionally it also check last reboot time and calculate it’s up time. Script will collect following information: – BootUpTime – UpTime – RebootDate – UserName – Action – Process – Reason Write-Host command has been used for displaying “UpTime” and “BootUpTime” values …