Get domain role and PC type from remote computers

Today I want to show how to get domain role and PC type using PowerShell function. You can get this information easily using 1 liner script but results will be presented as numbers. Domain role and PC type Function is based on Get-WmiObject command and it query Win32_computersystem class. To get “PC type” and “Domain Role” using just one command we have to use Select-Object cmdlet after the pipeline: Unfortunelty …

ADFS_product_version

Get ADFS product version using PowerShell

In this short arcticle you’re gonna find out how to check ADFS product version on multiple remote servers. Recently I had to scan my environment for auditing purpose. One of the tasks was to compare ADFS service product version. ADFS product version To check it on single machine we can use Get-Item cmdlet: It getting a little bit more complicated if you have plenty of severs and they are Server …

How to create dump files remotely (ProcDump) using PowerShell?

Recently I had to create memory dump files for multiple remote servers. I found great tool called ProcDump on Microsoft page which can do it. Unfortunately it can’t be run remotely so I had to combine this tool features with PowerShell commands. ProcDump ProcDump is a command-line utility whose primary purpose is monitoring an application for CPU spikes and generating crash dumps during a spike that an administrator or developer …

free disk space

Get free disk space from remote computers

One of the things that you have to monitor in your environment is free disk space. In this short article I want to share with you some code lines which help to create disk report. Free disk space Script is based on Get-WmiObject cmdlet which gets instances of Windows Management Instrumentation (WMI) classes or information about the available WMI classes. For more information please refer to Microsoft docs page. Script …

PowerShell Tip of the Week: Compare two CSV files

In this article I wanted to show you how to compare two CSV files using Compare-Object command. It might be useful if you run some scans on regular basis and want to check if they contains the same data. Compare-Object Script is based on Compare-Object cmdlet which compares two sets of objects. One set of objects is the “reference set,” and the other set is the “difference set.” The result …

Get AD System info remotely using PowerShell function

In this post you will find out how to get basic AD system information using PowerShell function. There are multiple articles on our blog describing plenty of Active Directory aspects. This time I want to show you another great function which helps discover useful data from remote systems. Get AD System Using below function you can get the following information: – Computername – DomainDNSName – DomainShortName – ForestDNSName – IsNativeMode …

How to add progress bar in your PowerShell scripts?

Today you will learn how to add progress bar in your code. In last post I described how to combine CSV files and this time I’m gonna show how to use those files and add cool feature to script. Progress bar Script is based on Write-Progress cmdlet which displays a progress bar in a Windows PowerShell command window that depicts the status of a running command or script. You can …

PowerShell Tip of the Week: Combine multiple CSV files

Recently I had to combine multiple files and count unique users from them. Script is pretty simple but it might me useful in some troubleshooting sessions. Below you can find two examples about how can this be done. Combine CSV files I created folder called Files on my desktop and pasted there user lists in CSV format. Files contains multiple columns but I was focusing only on Samaccountname: File example …

PowerShell Tip of the Week: Check connectivity to multiple servers

You can find multiple articles on our blog about checking connectivity. This time I want to show you how to check it for bunch of servers on specific port. Check connectivity Script will use Test-NetConnection command where you can specify port number. For single machine you can use the following one-liner script: On the beginning you have to provide servers and destination servers againts which you want to check connection: …

Get ADFS token requests remotely using PowerShell

Today I want to share simple script for getting ADFS token requests remotely. It might be useful if you want to ensure that load is equally processed in your farm. ADFS token requests Script is based on Get-Counter command where we have to specify ADFS tokens counter “\AD FS\token requests/sec”. It monitors the number of token requests sent to the federation server including SSOAuth token requests per second. More info …