Mike Sheldon
System Admin and Identity Management
10/18/2022
Need to automate a task?
8/26/2022
Update AD Username Casing
We all know that usernames in Active Directory are not case sensitive, for the most part everywhere that is the case. But I had a customer who wanted to ensure all the usernames were lowercase for reasons we shall not ask.
Below is just one example of how you can accomplish this in PowerShell
$InformationPreference = 'Continue'
$users = Get-ADUser -Filter * -SearchBase "OU=MSHELDON,DC=T4EDEV,DC=local"
foreach($user in $users) {
try {
$user | Set-ADUser -Replace @{ sAMAccountName = $user.SamAccountName.ToLower() }
Write-Information "Updated user [$($user.SamAccountName)]"
} catch {
Write-Warning "Failed to update user [$($user.SamAccountName)]"
}
}
7/25/2022
Generate Self-Signed Certificate with PowerShell
It's been a long time, but I'm back. Here is a sample script to generate a self-signed certificate. This was helpful for building API access to Adobe Cloud User Management API
### Create Self-Signed Certificate (only works Windows 8.1, 10, Server 2016+ ###
$Name = "MyCert"
$ExportPath = "C:\Data" # Path to export cert
$Password = "MySecretPassword" # Passphrase on cert
$CertTtlMonths = 24 # Lifespan of the cert in months
$SecurePwd = ConvertTo-SecureString -String $Password -Force -AsPlainText
$Certificate = New-SelfSignedCertificate -DnsName $Name -CertStoreLocation "cert:\LocalMachine\My" -Provider "Microsoft Enhanced RSA and AES Cryptographic Provider" -HashAlgorithm "SHA256" -NotAfter (Get-Date).AddYears($CertTtlMonths)
Get-ChildItem -Path ("cert:\localMachine\My\" + $Certificate[0].Thumbprint ) | Export-PfxCertificate -FilePath "$ExportPath\MyCert.pfx" -Password $SecurePwd
### Export Public Key (Required Server 2016+) ###
Export-Certificate -FilePath "$ExportPath\MyCert.cer" -Cert $Certificate -Type CERT -NoClobber
CertUtil -Encode "$ExportPath\MyCert.cer" "$ExportPath\MyCertB64.crt"
10/25/2014
Server/Network Monitoring
I recommend giving it a spin, it's worth a look.
Point of Sale Project Discontinued
2/15/2014
Building a better experience
Currently I hope to provide an open demo for everyone by the beginning of May. The holidays and consultancy projects have taken up most of my take as of late, but it's time to get back on track. Below you'll find some examples of the current development, all of it currently is very rough. The overall look and feel of the product will be driven by the users once I can provide a hands-on demo.
9/13/2013
GaPoSh v0.04 Released! Over 50 Commands Available!
GaPoSh v0.04