• Skip to primary navigation
  • Skip to main content
  • Skip to primary sidebar
  • Skip to footer
ControlUp Community

ControlUp Community

Connect, Learn, and Grow

  • Blog
  • Podcast
  • Meetups
  • Archives
  • Categories
    • ControlUp One Platform
    • ControlUp for Apps
    • ControlUp for Compliance
    • ControlUp for Desktops
    • ControlUp Scripts & Triggers
    • ControlUp Synthetic Monitoring
    • ControlUp for VDI
  • Topics
  • Events
    • Logos & Wallpaper
    • ControlUp.com
  • Join

Renaming FSLogix Profiles with ControlUp Scripts

Posted on November 28, 2023

A user asked for a script that logs off a user and renames their FSLogix profile on the share. ControlUp suggested two ways to accomplish the task depending on group policy settings. If FSLogix is set for "Access network as computer," a script action executed in the machine context would work. If not, the ControlUp console user’s permission needs to be granted on the profile share. A script would need parameters for the Session Id, FSLogix Profile Container Path, and User. The old profile will be renamed while the new one is created for the helpdesk to give users.


Read the entire ‘Renaming FSLogix Profiles with ControlUp Scripts’ thread below:

Had an idea for a script that logs off a particular user, and renames their fslogix profile on the profile share. Any thoughts on how this could be done? Assuming the user running the controlup console has permissions to touch the users profile on the share both permission-wise and network-wise. Or that the profile-renaming is initiated from the VDA..


Tagging @member and @member


Interesting idea, why are you looking to rename the profile?

ControlUp gives a couple ways this can be accomplished with our script action execution context depending on how FSLogix is configured and the permissions on the file share.

https://admx.help/?Category=FSLogixApps&Policy=FSLogix.Policies::944266be3eb268125de24d6ecaa5365d

1 – FSLogix is configured for "Access Network as computer"

If FSLogix is configured with this group policy object then you can create a script action that executes in the machine context. The computer’s permissions should be able to do the modification. This is the "profile renaming is initiated from the VDA" you are looking for

2 – FSLogix is NOT configured for "Access network as computer" this means in a secure environment that only the user will have access to their profile share.

If you can grant the ControlUp console user permission to the FSLogix profile share with permissions to modify the vhdx file, then it should be trivial to solve this issue.

The script would have a couple parameters that could be passed to it.

a) Session Id

b) FSLogix Profile Container Path

c) User

The script action could then do a (psudeocode):

“`logoff.exe $SessionId

add wait check that the user is logged off

Get VHDX file

$VHDXFile = get-childitem "$FSLogixPath\$user*.vhdx #whatever your path maybe

may need a check to ensure only one VHDX file was found

Rename $VHDXFile.fullname NewName“`


renaming to give the user a new profile while keeping the old for backup

but thanks, will give it a try. will make it easier for our helpdesk to give users a new profile without identifying fslogix share across customers

is the fslogix profile path not a record property available in the user session? 😞

Continue reading and comment on the thread ‘Renaming FSLogix Profiles with ControlUp Scripts’.  Not a member? Join Here!


Categories: All Archives, ControlUp Scripts & Triggers
Topics: Backups, ControlUp Solve, FSLogix, Logs, Scripts

Ask Us Anything, Connect, Learn, and Grow with the ControlUp Community!

Login to the ControlUp Community to ask us anything, stay up-to-date on what’s new and coming soon and meet other like-minded techies like you.

Not already a member? Join Today!

Primary Sidebar

ControlUp Academy

Enroll in ControlUp Academy for expert-led technical training, equipping you with skills to effectively deploy, manage, and grow your ControlUp investment.

Learn here >

Rotating Images

Hidden Gem from our Community on Slack!

ControlUp Betas - What's Coming Next?
NEW ControlUp Features - Stay Up-to-Date!
ControlUp Scripts - Scripting, Zero to Hero
Latest KB Articles - Be the First to Learn
Did you Know - with Sivan Kroitoru
Practical Perspectives Technical Use Case Training

Video Tutorials Library

Visit our technical how-to videos, offering step-by-step tutorials on advanced features, troubleshooting, and best practices.

Watch here >

ControlUp Blog

Check out the ControlUp blog for expert advice and in-depth analysis.

Read here >

ControlUp Script Library

Visit the ControlUp technical script library, which offers a multitude of pre-built scripts and custom actions for your monitoring and troubleshooting requirements.

See here >

ControlUp Support

Visit the ControlUp support home and to delve deeper into ControlUp solutions.

Browse here >

Download ControlUp RealTime DX

Start with ControlUp for real-time end-user environment insights, swift troubleshooting, and unprecedented performance optimization. Download now.

Download here >

Footer

      

ControlUp Community
Of Techie, By Techie, For Techie!

Terms of Use | Privacy Policy | Security
Dive Deeper, Learn more at ControlUp.com

  • facebook
  • twitter
  • youtube
  • linkedin

© 2023–2025 ControlUp Technologies LTD, All Rights Reserved.

We use cookies to ensure that we give you the best experience on our website. by continuing to use this site you agree to our Cookie policy..