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: 8.3, the Undead Path

    8.3 is a common reference to the DOS name limit of 8 characters for the filename and 3 characters for the file extension.  E.g.: command.com. NTFS did away with that, but it still haunts us in the form of legacy .BAT files that can’t handle file paths with space characters in them (and may blow...
  • Blog Post: PowerShell One-Liner: Removing a System Variable

    We've learned we can create system variables on a remote machine with the setx.exe command: PSH> setx -m remote.machine My_System_Variable VariableData However, setx doesn't give us a way to remove the variable. PSH> (new-object -com wscript.shell).environment("system").remove("My_System_Variable...
  • 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)