A user wanted to send a message to the user whose disk had low profile space using an FSLogix trigger, but the script action for this couldn’t be used. Oliver suggested creating a trigger for disk space and then using a script follow-up action to find the user GUID/key, followed by a send message action. He also suggested using Powershell to get the session ID of the user and using the MSG.exe native functionality to send a message to a specific session, if multiple users were using the same machine. Dennis suggested adding a filter for FSLogix Disk Type to the Trigger filter editor, and Nicholas linked a script that is helpful for single session setup. The roadmap also includes FSLogix disks per user.
Read the entire ‘Sending Messages Based on FSLogix Triggers’ thread below:
Looking to take a “% Free Space” value from FSLogix and combine it with the session it belongs to, to send a user a message via the existing Horizon community script that sends messages to user. I worked with support and solved the issue with the Horizon messaging script, only to find out that you can’t use that script with an FSLogix-based trigger.
Triggers are based on columns within tables. This column is in the FSLogix Disk table/view and only the columns within that view can be added to the same trigger.
In this case the columns have the machine the disk is mounted to but not the user. Disk Name gets you close but its still not a user name.
Yeah. That’s what I’m running into. Really need a solution that allows me to alert users to low* profile space inside FSLogix
@member do you think you can add this feature request to our UserVoice platform?
cc: @member
Sure. Link plz?
Click on Oliver in Solve and then share your feedback.
With 8.8 you could:
• Create a trigger for disk space
• Create a script follow up action
• Script follow up action execution context is set to console/monitor. So it runs on the monitor that noticed the disk space issue
• Script action gets disk name and machine name where the disk is attached from the trigger via script arguments
• Script action uses invoke-cuquery to find the user on the machine. As you need to get the user GUID/key for the next step.
• Script uses invoke-cuaction to send a message via the send message action
You can also run the script on the machine with the FSLogix disk. Use Powershell to get the session ID of the user and use MSG.exe native functionality to send a message to a specific session
I will look into this right now!
I was trying to do this with a GPO but … it’s proven more difficult than it should
could I use the “FSLogix DIsk – Free Space < 10%” trigger that was published recently, as the first part of this? https://support.controlup.com/docs/trigger-packs
yeah
Dennis, what about multi-session? Disk name gets you close but not exact.
a single machine with multiple sessions by the same user?
We are single session (currently)
RDSH, but it sounds like thats not relevant here.
msg.exe can target specific sessions/users. If the same user has multiple sessions on the same host, just msg all of them 🙂
No no, multiple users same machine
So more than one disk mounted and no username associated.
Its why we didn’t make FSLogix metrix on session columns and tied everything to machine. Too complex.
Oh. The script Nicholas linked implies that the disks naming convention is Profile-
That is the default, and what we use, for the disk naming convention
Since I’m single session my script is fairly easy then, yeah? Just “msg * sample message “
yeah
I think even a scripting noob like me can handle that
With this approach I can’t have it execute on the Control Up Monitor, right? Sorry. This is my first foray into scripting and adv Controlup usage.
yeah with this approach you want to set the script action execution context as “target machine”. Which I believe is the default
What privilege does an account used need to have on the target machine?
just leave it default. System should be enough
I think the only issue I can’t solve this way is I can’t filter out ODFC vs Profile disk
Add a filter on FSLogix Disk Type to your trigger.
That’s using the “Add Collection” to the filter editor?
Just an AND
Just add two items.
Does it matter the order?
Nope, since its a simple AND.
collections would be for something like this AND this OR this AND this.
two collections with an OR
Thank you for clarify that
First test worked!
Boom
Thank you both very much. Obviously gets more complicated when/if we go multi session
@member I can tell you FSLogix disks per user are a roadmap item
It would be nice to use the Send Horizon Message script action that we have setup for other items, such as latency and packet loss, etc
Continue reading and comment on the thread ‘How to Send Messages Based on FSLogix Triggers’. Not a member? Join Here!
Categories: All Archives, ControlUp Scripts & Triggers