Skip to main content
Question

Rename a Folder in a User's Profile


Forum|alt.badge.img

Would anyone have a worklet that can rename a folder in a users profile, i.e looking to rename C:\Users\USERSPROFILE\AppData\Roaming\Microsoft\Signatures so the folder Signatures is renamed to SignaturesOLD

3 replies

Forum|alt.badge.img
  • Automox Employee
  • 132 replies
  • March 12, 2025

Hi p.blakeley,

I had success with this Worklet, no eval code
Remediation Code:

gci -name c:\users | foreach ($_) {
  Rename-Item -Path "C:\users\$_\AppData\Roaming\Microsoft\Signatures" -NewName "SignaturesOLD"
}
Pre-Deployment
Post Deployment

 

Let me know if you have any issues.

Regards,


Forum|alt.badge.img
  • Author
  • Rookie
  • 1 reply
  • March 24, 2025

Hi Mark, i have given that a try but it is erroring saying Evaluation Code is required, any ideas?

 

 


Forum|alt.badge.img
  • Automox Employee
  • 132 replies
  • March 24, 2025

We can skip the eval code by typing ‘exit 1’ or ‘exit 0’.

It is only used if you want to routinely detect and modify an endpoint, in this case its really a one-time use case, so we statically skip the eval code.

Regards,

Mark


Reply


Cookie policy

We use cookies to enhance and personalize your experience. If you accept you agree to our full cookie policy. Learn more about our cookies.

 
Cookie settings