Jump to content
Quenten Grasso

Change System Group Script

Recommended Posts

Hi,

So as I start to get used to Pulseway, here's quick script I've made up to change the *Nix/Win computer group on the fly. I haven't yet found an easier way to do it yet.  This seems to work for me so hopefully it helps someone else.

I've just created a Script Category and added a version of this script per customer/group in this folder.  So create your script edit the Group below to suite your requirements.

Linux/Bash Tab

#!/bin/bash
if [ -f /bin/sed ] 
then
cp /etc/pulseway/config.xml /etc/pulseway/config.xml.backup
/bin/sed -i '/<ComputerInformation Name="" Group="/c\<ComputerInformation Name="" Group="My Company - Linux Servers"/>' /etc/pulseway/config.xml
else
echo "Sed not found!"
fi

Windows/Powershell Tab

Set-ItemProperty -Path "HKLM:\Software\MMSOFT Design\PC Monitor\" -Name GroupName -Value "My Company - Windows Servers"

 

Share this post


Link to post
Share on other sites

Hi @NathanB,

Please note, that this functionality will no longer work after we will upgrade Pulseway to the version 6.0. In version 6.0 all your monitored systems will be owned by the server and server will no longer trust any changes which are maid on the system in regards of the change of the group name. If the system is known to the server, then server will overwrite all the changes which are made on the agent. In order to move the system from one group to another you will need to use the Pulseway WebApp -> Server Admin -> Configuration section.

Or for the Free accounts Systems -> Configuration section.

Share this post


Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.


×
×
  • Create New...