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: One-Liner: Valid PSH Verbs

    I try to use proper PowerShell verbs, but I’m not always sure what they are (or what they do, which is another matter).  Here’s a quick one-liner to dump those verbs out as a [string[]]$array: Get-Command -CommandType cmdlet | Select-Object -ExpandProperty Verb | Group-Object | Select-Object -ExpandProperty...
  • Blog Post: PowerShell for Non-N00bs: Adding a User to a Group (with Script)

    Here's the one-liner: ([ ADSI ] "WinNT://$computerName/$localGroupName,group" ).Add( "WinNT://$domainName/$userName" ); But a script may be more useful for execution.
Page 1 of 1 (2 items)