Get-Process

Get process remotely including username using PowerShell

In today’s article I would like to describe how to get process remotelty used by some specific username. Most of PowerShell admins are familiar with this command but no all knows its paramter called IncludeUserName. Recently I had to check processes under some username on bunch of servers. Below you can find few helpful examples. Get process locally Get all processes for some specific user is not difficult. Paramter -IncludeUserName …

Test URL on Server Core machines using PowerShell

Recently I had to test URL on server core machines. I created simple scripts to generate report with just basic information like status code and content. Below you can find short description how to check http and https URLs. Test URL For checking http URL I used Invoke-WebRequest command. Unfortunately when I run it localy on server core machine it returned me an error: Error message: The response content cannot …

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 …

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: Building your first chart report

Today’s short tip will be about building your first chart report. You can find several articles on our blog about memory utilization. This time you will learn how to get results in columns chart. Chart report As some of you already know PowerShell allows you to create charts and graphs. To do this we need to use .Net classes. The System.Windows.Forms.DataVisualization.Charting namespace contains methods and properties for the Chart Windows …

Update XML file remotely using PowerShell

Updating XML file is pretty simple. The more difficult part is to do this remotely and create nice formatted output. In this article I will try to explain how to do this in simple way. Updating XML file Lets say that structure of our Web.Config XML file will look like this and we want to check value from Encryption key: Configuration -> AdfsConfiguration -> Certificate -> Add To import file …

Use PowerShell to format port query (PortQry) output

Recently I had to check connectivity to several servers on some specific ports using PortQry. As some of you already know this command will return some kind of the connectivity test report. I wanted to convert this into nice formatted table. Port Query Port Query – Display the status of TCP and UDP ports, troubleshoot TCP/IP connectivity and security, return LDAP base query info, SMTP, POP3, IMAP4 status, enumerate SQL …

PowerShell Tip of the Week: Get-Service example

Starting from today we will add also short articles with simple PowerShell examples once per week. Below you can find how to use Get-Service command against several servers and get nice formatted output. Get-Service The Get-Service cmdlet gets objects that represent the services on a local computer or on a remote computer, including running and stopped services. In this example we will limit our query to 4 properties: – MachineName …

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 …

PowerShell one-liner: Get eventlog

Use PowerShell one-liner to get eventlog details quickly and easily. In this article you will find several useful examples which will help you in daily operational tasks. Get-Eventlog The Get-EventLog cmdlet actually serves two purposes: it enables you to manage your event logs, and it also enables you to get at the events contained within those event logs. To get lognames list we just have to use parameter -list : …