get computer

Get AD Computer examples

In this post, I want to share a few examples of Get-ADComputer command. If ever you wondered how to get computer objects from Active Directory by some specific property, by password last set property or range, last logon date, or some other search criteria this article if for you. Below you can find few scripts that I was using recently 🙂 Get all computers To get all computers from Active …

Connect-MsolService

Identify Objects with DirSyncProvisioningErrors using PowerShell

Find out how to identify objects that have DirSyncProvisioningErrors using PowerShell. Some time ago we added an article on how to Identify Azure AD provisioning errors. In this short post, I will share a simple script for creating a CSV report for such errors. Azure Active Directory To get errors we need to first connect to Azure Active Directory using Connect-MsolService and entering credentials for a tenant administrator. Credentials: Connection and …

HTML report

Create HTML email report using PowerShell

Create HTML report using PowerShell. Some time ago I added a post about creating your own report. This time I wanted to show you how to create a basic system performance report and send it to your mailbox. HTML Report Below you can find PowerShell script for checking the following system details using Get-WMIObject remotely: BootUpTime UpTime C: Free space % PhysicalRAM Memory % CPU % You need to have …

disconnected sessions

Get disconnected sessions on all Domain Controllers

Get disconnected sessions on all Domain Controllers using PowerShell script. In this short article, I wanted to show you how to use Query User command to get user sessions and export final results to CSV file. Domain Controllers To get list of all Domain Controllers you need to use Get-ADDomainController command from ActiveDirectory module. Command gets one or more Active Directory domain controllers based on discoverable services criteria, search parameters …

Check Azure Kubernetes expiration date of SPN

Hello again PowerShell maniac! Today got for you special script for check Azure Kubernetes expiration date of SPN. Did you ever worked with Azure Kubernetes Service or simply Kubernetes on different platform than Azure? If not let me explain you in few words what this service is used for. If you ever worked with Docker and containers you shouldn’t have a problem with understanding of this service, as basically AKS …

KeyVault expired

Get Azure Key Vault expired secrets

Hey Scripters! If you want to gather Azure Key Vault expired secrets by the script, today is your lucky day – I’ve prepared script for that 🙂 I was searched for some easy functionality which will easily notify me about Key Vault expired secrets. The only solution I found is Events functionality in Key Vault. However after few of my test (during writing this article this option is still in …

OU

Get computer objects from OUs

In this short article, I would like to share the PowerShell script for getting computer objects from parent Organizational Units (OUs). Organizational Unit (OU) is a container in the Active Directory domain that can contain different objects from the same AD domain: other containers, groups, user and computer accounts. Get computer objects Recently I was asked to prepare a report in Excel and count objects in each OU. To do …

netstat traceroute files

Get netstat and traceroute results from remote servers

Today you will find out how to get netstat and traceroute results from remote machines. I often had a situation where I was asked to do some basic checks from a network perspective. It’s easy once you already have a script for that. Netstat and traceroute There are multiple ways to do network checks. I guess that most of you are probably familiar with commands like ipconfig, tracert, netstat and …

Get pending updates in Software Center on remote machines

How to get updates from the Software Center on server core machines? Recently I had to investigate some patching problems on multiple servers. As I’m working mostly on GUI-less operating systems it was time-consuming to display that from the command prompt. I decided to create a script to generate such a report. Software Center updates If you want to open Software Center from the command prompt you can navigate to …