Skip to content

Instantly share code, notes, and snippets.

@jamiechalmerzlp
Created August 16, 2022 08:27
Show Gist options
  • Save jamiechalmerzlp/ba3c288ae2252e761eaa9a104dae3b0a to your computer and use it in GitHub Desktop.
Save jamiechalmerzlp/ba3c288ae2252e761eaa9a104dae3b0a to your computer and use it in GitHub Desktop.
$members = net localgroup administrators |
where {$_ -AND $_ -notmatch "command completed successfully"} |
select -skip 4
$members += $(Get-Date -format 'd')
write-host $members
#Only keep this line if you are using Datto RMM for a UDF.
#New-ItemProperty -PropertyType String "HKLM:\SOFTWARE\CentraStage" -Name "Custom5" -Value $members
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment