Get “User Rights Assignment” security policy settings

Recently I had to check if adfssvr account is present in “Generate security audits” policy settings. As I’m working in large scale environment and mostly on server cores it was obvious that it needs to be done by script. User Rights Assignment Below you can find list of user rights. In this example we will focus on SeAuditPrivilege – Generate security audits. More info about user rights – link. To …

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 …

Configure PowerShell remoting for Azure VMs

Hey scripters, in todays article I want to show you how to configure PowerShell remoting for Azure VMs. Recently I wanted to run the script which will check installed software on all of my Azure VMs. Unfortunately I received following error from each of the machine. I thought that it is only the problem with firewall configuration on Azure VM, so I configure additional rulles to allow connection on port …