Jump to content
View in the app

A better way to browse. Learn more.

Pulseway

A full-screen app on your home screen with push notifications, badges and more.

To install this app on iOS and iPadOS
  1. Tap the Share icon in Safari
  2. Scroll the menu and tap Add to Home Screen.
  3. Tap Add in the top-right corner.
To install this app on Android
  1. Tap the 3-dot menu (⋮) in the top-right corner of the browser.
  2. Tap Add to Home screen or Install app.
  3. Confirm by tapping Install.

Featured Replies

Posted

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".

 

Screenshot2024-10-17104817.thumb.png.a935780284e50329a60ba6f4d8ab9e95.png

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?

Edited by Marc Lye

Create an account or sign in to comment

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.