/build/static/layout/Breadcrumb_cap_w.png

Deleting a Folder in folder within C:/Users/(User)/Appdata/Roaming

I am very new to Kace and we have a problem with MS Teams not working correctly. The current bandaid we have found out is to delete the subfolder in C:\users\%users%\appdata\roaming\Microsoft and deleting the Teams folder within the Microsoft folder. I am wanting to create a script that will delete that folder automatically every morning. I looked up some tutorials on how to do so but what I have found hasn't been working. What am I doing wrong? also for the Directory and Parameters in my photo attached can I put in C:\Users\%users%\Appdata\Roaming\Microsoft\Teams or do I need to be specific to the user for example C:\users\Johnsmith\Appdata\Roaming\Microsoft\Teams? I was hoping to do a generic %users% if possible so it would just delete the Teams folder for anybody who is signed into that pc. f8BElu5oBC6XPYAAAAASUVORK5CYII=


0 Comments   [ + ] Show comments

Answers (1)

Posted by: Purp_Hat 8 months ago
White Belt
0

I would create a powershell script, and use the Scripting in KACE to run the powershell script. You will get less problems this way. Here is one of my examples. My CleanZoom .ps1 does essentially what you are trying to do in a AppData folder, Just use the task in Scripting to launch the .ps1 in the directory KACE would put it in. $(KACE_DEPENDENCY_DIR)




LIBgAACCCCAAAIIIIAAAggggAACCCCAAAIIIIAAAskIEIQko8QxCCCAAAIIIIAAAggggAACCCCAAAIIIIAAAgggMCIFCEJG5LIxaAQQQAABBBBAAAEEEEAAAQQQQAABBBBAAAEEEEhGgCAkGSWOQQABBBBAAAEEEEAAAQQQQAABBBBAAAEEEEAAgREpQBAyIpeNQSOAAAIIIIAAAggggAACCCCAAAIIIIAAAggggEAyAgQhyShxDAIIIIAAAggggAACCCCAAAIIIIAAAggggAACCIxIAYKQEblsDBoBBBBAAAEEEEAAAQQQQAABBBBAAAEEEEAAAQSSESAISUaJYxBAAAEEEEAAAQQQQAABBBBAAAEEEEAAAQQQQGBEChCEjMhlY9AIIIAAAggggAACCCCAAAIIIIAAAggggAACCCCQjABBSDJKHIMAAggggAACCCCAAAIIIIAAAggggAACCCCAAAIjUoAgZEQuG4NGAAEEEEAAAQQQQAABBBBAAAEEEEAAAQQQQACBZAQIQpJR4hgEEEAAAQQQQAABBBBAAAEEEEAAAQQQQAABBBAYkQIEISNy2Rg0AggggAACCCCAAAIIIIAAAggggAACCCCAAAIIJCNAEJKMEscggAACCCCAAAIIIIAAAggggAACCCCAAAIIIIDAiBQgCBmRy8agEUAAAQQQQAABBBBAAAEEEEAAAQQQQAABBBBAIBkBgpBklDgGAQQQQAABBBBAAAEEEEAAAQQQQAABBBBAAAEERqQAQciIXDYGjQACCCCAAAIIIIAAAggggAACCCCAAAIIIIAAAskIEIQko8QxCCCAAAIIIIAAAggggAACCCCAAAIIIIAAAgggMCIFCEJG5LIxaAQQQAABBBBAAAEEEEAAAQQQQAABBBBAAAEEEEhG4H8BqcRoSsfd8lMAAAAASUVORK5CYII=

 
This website uses cookies. By continuing to use this site and/or clicking the "Accept" button you are providing consent Quest Software and its affiliates do NOT sell the Personal Data you provide to us either when you register on our websites or when you do business with us. For more information about our Privacy Policy and our data protection efforts, please visit GDPR-HQ