Category Archives: PowerShell

Encrypt Password In CTX1 Encoding With PowerShell

Encrypts the password in a reversible format, the format used in some Citrix applications.

Posted in PowerShell | Tagged | Leave a comment

Misleading PowerShell Exceptions–Example #1

In PowerShell 5.0 on Windows 10 was looking at a script with function not working: The exception thrown by Powershell was: You cannot call a method on a null-valued expression.At C:\Users\chentiangemalc\Documents\Scripts\Test.ps1:5 char:9+     if ([System.String]::IsNullOrWhiteSpace($condition))+         ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~    + CategoryInfo          : InvalidOperation: (:) … Continue reading

Posted in Debugging, PowerShell | Tagged | Leave a comment

Check Validity and Download SSL Certs in PowerShell

Little utility I made to check a list of URLs, their SSL certs, including any URLs they redirect to. The entire certificate chain for each host is also downloaded into %temp%\SslCerts folder Script source files can be downloaded here:!Aj0HCnRwyKPhge1bfpIYIlTJ6IugVQContinue reading

Posted in .NET, PowerShell | Tagged , | Leave a comment

Case of the Missing Printer Ports

A Citrix environment had both Windows Server 2008 R2 published desktops and Windows 7 SP1  VDIs On the Windows 7 VDIs the ports tab on printers added via a print server was always empty. We did a quick comparison between … Continue reading

Posted in API Monitor, Citrix, PowerShell, WinDbg | Tagged | Leave a comment

Retrieve Time Machine Password Last Reset via PowerShell

In diagnosing a machine lockout issue I wanted to find the time that: Machine Password was last set in Active Directory Machine Password was last set locally By default when a machine has a healthy connection to Active Directory you … Continue reading

Posted in .NET, Active Directory, PowerShell | Tagged | Leave a comment

Using PowerShell + Word Interop to Extract Tables from PDFs

I needed to extract some tables from PDFs. If you’ve ever done this before you realise PDF format doesn’t really contain table information, it just contains lines and positions of text. Testing out Tabula which worked reasonably well, but … Continue reading

Posted in Office, PowerShell | Tagged | Leave a comment

Extract Module Info From a DMP File with PowerShell

Modify $cdb to point to CDB.exe from Windows SDK Debugging Tools. At end of script contains usage example… Script can be downloaded here Set-StrictMode -Version 2.0 # path to CDB from Windows SDK Debugging Tools $cdb = "C:\Program Files … Continue reading

Posted in PowerShell, WinDbg | Tagged | Leave a comment