How to use Cloud Shell in Visual Studio Code

Today’s post will not show you any PowerShell script, but hope it will show you how to use cloud shell in Visual Studio Code 😉 What is Cloud Shell? If you follow our blog a little bit longer you can probably read article PowerShell in Azure Cloud Shell now available!. To make long story short, for those who are not familiar with Cloud Shell – it’s an interactive shell available from …

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 …

Get cryptocurrencies price using PowerShell

Today’s script will not be directly connected with Microsoft stuff, but it will show you how to get cryptocurrencies price using PowerShell. Cryptocurrencies every year become more popular and in my humble opinion will enter the mainstream very soon. I thought it can be very handfull for cryptotraders who are interesting in PowerShell to have function which will get cryptocurrencies price. Base on this script more experienced scripters can build …

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 …

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 …

Test credentials using PowerShell function

Test credentials is definitely one of the most important prerequisites when it comes to more advanced scripts. When you looping multiple remote servers and you provide wrong password in your credentials variable then your account might be locked out. Below you will find simple way to avoid such situations. Test credentials The Get-Credential cmdlet prompts the user for a password or a user name and password. By default, an authentication …

Find duplicated SPNs in Active Directory

Today’s script will help you to in easy way find duplicated SPNs in Active Directory. What is SPN? SPN (Service Principal Name) according to Microsoft definition is unique identifier of service instance. To better understand it we can compare it to alias (CNAME record) in DNS. A Service Principal Name is a pointer to account created in Active Directory domain. It can be either created for service account or computer …

PowerShell Tip of the Week: Uninstall SCCM client

Today’s short tip is about SCCM client uninstall process. One of the tasks for complete client removal is of course running ccmsetup.exe uninstall command. To do this for a bunch of servers we can use Invoke-Command. Uninstall SCCM client On the beginning its worth to check if ccmsetup.exe file exist on affected machine. To verify this we are going to use Test-Path command which will return “True” of “False” value: …

Approve SCOM pending agents via PowerShell

Recently I had to approve several SCOM pending agents in my environment. Of course I won’t do this manually so I started searching for the answers on internet 🙂 . I found SCOM module command called Approve-SCOMPendingManagement and I decided to create a script based on that and share it with you. Remember that you need appropriate permission to approve servers in pending management. SCOM pending agents Approving single server …