-
Request for help! Trying to record local admin group memberships for all systems
Hi Guys, I've cobbled together a workflow using Powershell that looks at membership of the local Administrators group and that output is emailed to me. That's gone without issue but I want to refine it and that's where I'm struggling. So I know that in our case, every machine's local admin group has some membership, i.e. the local admin account and our domain admins group. I want to filter these machines out and have email results for only those where there's anything more than those "defaults". Get-LocalGroupMember -Group 'Administrators' | Where-Object {$_.PrincipalSource -ne 'Local' -and $_.Name -ne 'MyDomain\Administrator' -and $_.Name -ne 'MyDomain\Domain Admins'} | Select-Object -Property 'Name','PrincipalSource' This code works locally and using Pulseway's remote Powershell function. What I was hoping to do was to basically skip a system if the output of the code was blank or null. For systems where I haven't received any output back when using Pulseway's Powershell, I guess I don't know if the output is actually completely empty or not. I also don't know if using Pulseway's variable function is considered separately to the Powershell environment the code gets run in, if that makes sense? When I try to run the workflow on a single machine I always get emailed the results, even when the return from the Powershell is blank. I'm not brilliant with Powershell so have been searching around for alternatives. I was wondering about return codes perhaps but could I also put these into a Pulseway workflow?
-
Update the windows wallpaper via an automation script and task
Apologies for bumping the thread but will this require the client to be running an Enterprise version of Windows? I've been finding since going through a lot of Intune setup that without using group policy setting a desktop wallpaper and lock-screen wallpaper is a lot more difficult than it really should be! 😅 EDIT: I haven't tried the script but on second thought it's not using the PersonalizationCSP key in the registry so maybe this will be okay without an Enterprise SKU.
Marc Lye
Members
-
Joined
-
Last visited