Blog

PowerShell: Quick 1-Liner to Locate Path to Executable

PS C:\Users\tester> (get-command robocopy.exe) | select DefinitionDefinition----------C:\Program Files (x86)\Windows Resource Kits\Tools\robocopy.exeC:\Windows\system32\Robocopy.exe

PowerShell: Convert Between Various SSL Certificate Formats

# Install Choco (look for instructions in this blog)# Install openssl.lightchoco install openssl.light -y #…

Renew or Replace a SSL Certificate in Dynamics CRM

Error Message: "Exchange Online Security Certificate Expiration Please update your certificate or Exchange Online integration…

Penetration Testing of Active Directory

Foreword: the following information is intended as educational contents and advisories on security topics. Please…

Microsoft IIS: How to Forward from HTTP to HTTPS

1. Apply the URL Rewrite module as required:- https://www.iis.net/downloads/microsoft/url-rewrite- Extract and install it 2. Run…

PowerShell: Microsoft Exchange Admin Reports

Function importExchangeModule{ $snapinLoaded = (get-pssnapin microsoft.exchange.management.* -ErrorAction SilentlyContinue).Name $exchangeVersion=(GCM Exsetup.exe | % {$_.FileVersionInfo}).ProductVersion $exchangeVersionMajor=$exchangeVersion.Substring(0,2); $exchangeVersionMinor=$exchangeVersion.Substring(3,2);…

Microsoft Data Calculation for SQL & General Storage

1 Byte = 8 bits1 KB = 1024 bytes1 MB = 1024 KB (or 1048576…

Exchange Server Decommisioning

Decommissioning Exchange hosts should have all Exchange services disabled. Thereafter, we may safely turn these…

PowerShell: Obtain Domain Admin Credential and Save It as an XML for Subsequent Execution

Working Version: # Initialize with defaults$credFileExists=$False# This function is a workaround to the issue of…

PowerShell: Detect Windows Version

This little snippet is reusable on many occasions where Windows version targeting is required. function…

Microsoft Exchange Server Certificates

When Exchange Server certificates expire, it's the responsibility of the System Administrator to update those…

Barracuda Message Archiver & Office 365 Exchange Online Service Account Configuration

The following script grant an Office 365 Exchange online service account necessary permissions on Exchange…

PowerShell: Microsoft Exchange to Require that all Senders are Authenticated

In this scenario, the business decision is to limit exposure of certain internal accounts to…

PowerShell: Find Azure AD Connect Servers From On-remise AD

Azure AD Connect is a prevalent topic of the day. However, it is best practice…

ESXi 6.5 Installation Instructions

Prepare to Install ⦁ Reserve host Management & vMotion IPs ⦁ Pick an available IP…

HPE: Gen8 Bios Settings to Prepare Host for Virtualization Role

Proliant Gen8 Blade Servers HP Servers are often chosen as VMWare & Hyper-V hosts. To…

PowerShell: Command Line to Empty a Remote Directory

PowerShell Method $remoteUncPath="\\FILESHERVER01\FOLDER01"$emptyDirectory="C:\emptyDirectory"md -Force $emptyDirectoryRemove-Item "$emptyDirectory`\*" -force -recurse -ErrorAction Continuerobocopy $emptyDirectory $remoteUncPath /mir /R:0 /W:0…

PowerShell: Obtain Domain Admin Credential

This little snippet is reusable as an appendix to other scripts since Domain Admin access…

PowerShell: Discover Domains and Trusts in Microsoft Windows Environment

PS C:\Windows\system32> Get-ADTrust -Filter *Direction : BiDirectionalDisallowTransivity : FalseDistinguishedName : CN=kimconnectschools.org,CN=System,DC=kimconnect,DC=k12,DC=ca,DC=usForestTransitive : TrueIntraForest : FalseIsTreeParent…

PowerShell: Install Windows Cluster Admin

# Install Microsoft Clustering ManagementFunction installClusteringManagment{ # Set PowerShell Gallery as Trusted to bypass prompts…