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 …

Get Azure subscription quota limits using PowerShell

Today I want to show you function to gather Azure subscription quota limits. Recently for one of the customer I had a problem with quota limit for static IP addresses. Standard limit was reached quite quickly and I had to create support request in Azure to increase this limit. To be more proactive in the future I’ve created script which gather all Azure subscription quota limits and show usage in …

Get and set Azure WebApp IP restrictions using PowerShell

Today I want to share with you my 2 functions which will help you to manage Azure WebApp IP restrictions using PowerShell. IP restrictions in Azure WebApp allows define IPs from which WebApp / API will be available. All requests which will not match IPs defined in IP restrictions will be blocked. How functions works? Both functions are using Azure Resource Manager module in order to gather and set all …

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 …

Access Azure subscription using context

Recently I was a little bit annoyed by logging each time to Azure subscription, so I’ve preperaed the script to Access Azure subscription using context. What is context? Azure Context are metadata used to authenticate Azure Resource Manager requests. For more details please visit Microsoft docs site. How script works? Function which I prepared is used to save all contexts of Azure subscriptions assgined to account. As the input parameter …

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 …

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 …

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 …