Lessons Learned

My drop-site for interesting snippets and tips. If it's useful to you as well, great!

Browse by Tags

Tagged Content List
  • Blog Post: Decrypting SecureStrings (Once More!)

    [PSCredentials] have some interesting methods. Chief among them, at least for today, is GetNetworkCredential() . Well, what’s so special about this? The returned object has the .Password property which is the plaintext of the password. I’ll say it again: $PsCredential.GetNetworkCredential().Password...
  • Blog Post: Getting SRV Records with PowerShell

    PowerShell leverages .NET, and .NET exposes the System.Net.Dns class, so all should be happy, no?  Evidently not if it comes to SRV records.  Someone asked me how to do it, and I said, “That’s easy.  I’ll get back to you in a few.” A few hours later, I realized it wasn’t so easy. Get-NslookupSrvRecord...
  • Blog Post: PowerShell for Non-N00bs: Symlinks

    Here's how to create a shortcut in PowerShell. Actually, it's how to create a shortcut with COM in PowerShell function New-ShortCut { param ( [ string ] $target = $null , [ string ] $name = $target , [ string ] $parent = ( Get-Location ).ToString(), Normal 0 ...
Page 1 of 1 (3 items)