Category: Windows

PowerShell: Email Users with Expiring Passwords

# PasswordExpirationNotification.ps1 # Description: # This script performs the following tasks # a. Query Active…

PowerShell: Manage Remote Desktop Servers by Logging Off Idle Sessions That Have Certain Inactive Programs

# manageRdsSessions.ps1 # Sequence of workflow: # a. Gather active and disconnected sessions on all…

Resolving LDAPS Connection Errors

Errors: Can not connect to remote server: 5059 ERROR_CERTIFICATE_ERROR (unable to read server certificates from…

Microsoft Dynamics CRM IIS Pool Service Account Configuration

Summary The default CRM installation wizard provides some flexibility in specifying a deployment account. However,…

PowerShell: Coverting Hex or Bytes Array to ASCII

The following is an illustration of a practical usage of decrypting an ASCII encoded value…

PowerShell: Audit Failed Logins of A User

$username='rambo' function auditLockouts($userName,$domainController,$refreshMinutes=1){ function getLockouts($domainControler){ # Requirement: # Domain Controllers Audit Group Policy has been…

How to discover WSUS Server from Your Local Machine

# Method 1: PowerShell (the obvious choice) (Get-ItemProperty HKLM:\Software\Policies\Microsoft\Windows\WindowsUpdate).WuServer # Method 2: Command Line REG…

PowerShell: Audit Domain Controller Certificates

function auditDcCerts{ try{ write-host "Gathering Domain Controller Names..." Import-Module ActiveDirectory $osInfo = Get-CimInstance -ClassName Win32_OperatingSystem…

Deploying LDAP / Active Directory Self Service Password Portal

Overview: There are several choices of platforms to deploy Password Manager: Kubernetes, Docker, Windows, and…

Terminal Service Auditing – Generate Report of RDP Sessions with Certain Login Dates

# getLoginEvents.ps1 function getLoginEvents{ param( $computername=$env:computername, $daysLimit=30 ) $ErrorActionPreference='stop' try{ $logins=Get-WinEvent -ComputerName $ComputerName -LogName "Microsoft-Windows-TerminalServices-LocalSessionManager/Operational"|…

Memo of an Advisory Regarding WinRM on a Non-Domain Joined Server

# Enable WinRM winrm quickconfig <# Sample output PS C:\Users\Administrator> winrm quickconfig WinRM service is…

Function to Install Application and Its PowerShell Wrapper

# This function checks on whether a particular app has a corresponding PowerShell wrapper. If…

Microsoft Dynamics CRM Permission Errors

Error Message: WARNING: Source : mscorlib Method : HandleReturnMessage Date : 3:00:50 PM Time :…

Windows Group Policy: Set Chrome as Default with a Home Page

Opinion: So... your company wants to standardize on Chrome, eh? I must say that I…

HPe Nimble Storage & Microsoft Failover Cluster with Fileserver Roles

Overview: Microsoft Fail-over Clustering is often deployed in conjunction with SAN storage. In this scenario,…

Google G Suite Administrators (GAM) Useful Commands

Install Google GAM if (!(Get-Command choco.exe -ErrorAction SilentlyContinue)) {[Net.ServicePointManager]::SecurityProtocol = [Net.SecurityProtocolType]::Tls12Set-ExecutionPolicy Bypass -Scope Process -Force;…

PowerShell: Get Users and Computers Inside an OU

# getUsersAndComputersInActiveDirectory.ps1 $ouName="Test OU" $ouPath = "ou=$ouName,dc=kimconnect,dc=yoyo" $csvExportFile = 'c:\data\users_in_ou_$ouName.csv' $users=Get-ADUser -Filter * -SearchBase $ouPath…

How to Add Windows Administrative Templates to Domain Group Policies

Three Quick Steps to Adding ADMX Administrative templates are the blue prints of Windows machines.…

PowerShell: Detecting Windows Antivirus

One of the initial tasks of a Windows user is to determine whether a computer…

Problem Solving Exercise: Auto Manufacturing Case

Sample Answer 1. Produce a problem statement:We are investigating the root cause of production delays…