Basic DC health email report via PowerShell

Today I would like to share one of the scripts for basic DC health checks. Some time ago I added article about DCDIAG and Repadmin. This time I created html formatted report for DCDIAG, ADSystem and AD Services. You can modify this easily and add additional functions. DC Health report Script contains lots of lines so we need to break it apart to make it more understandable. For health checks …

Get cluster html formatted report using PowerShell

Getting cluster information is pretty simple, however its becoming a little more complicated when you want to get this remotely. In one of the previous articles I have written about getting cluster data remotely. Today I would like to share with you one of my newest script for creating cluster report. Final results will be send to email in nice formatted html table: Get cluster report I found some great …

Resend email if Send-MailMessage returns an error

Using Send-MailMessage command is pretty simple. However there are some situations where it might cause you some problems. I recently noticed that it sometimes returns timeout error – Error in processing. The server response was: 4.7.0 Timeout waiting for client input . To fix it I created simple loop to make 5 resend attempts – it can be useful if you had to add script to a task scheduler. Send-MailMessage …

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 …

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. Token bloat 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 …

Get list of Domain Controllers from your domain

Today I would like to show you how to prepare Domain Controllers report using Data Table. To get all DC’s we will use ActiveDirectory module. Basically you can get list of all Domain Controllers from your domain using just two commands: In this example I wanted to show you how to create Data Table and send results to your email in formatted HTML table. Script apart from gathering DC’s properties …

Create your own HTML formatted report – email

Today I would like to share with you one of the basic templates which I’m using for sending HTML reports via PowerShell. Article contains full description on how to prepare table and add to it user data gathered from Active Directory. Output will be send to your mailbox in nice HTML formatted report. HTML formatted report First we need to define columns names and add them to our table: After …