Greetings,
I am very new in the IT field and new to Lansweeper.
My project that I have been given is to eliminate OneDrive from our systems (We do not use it and a third party vulnerability scan shows some vulnerabilities.)I would like to wipe them out across all profiles in one go per machine.
I have been able to run the following script with no issues when I am on a machine:
cd /d %userprofile%
cd ..
for /F "tokens=*" %a in ('dir /ad/b') do cmd /c del /s/q "%a\AppData\Local\Microsoft\OneDrive"
However when I create an Install Package with that command in Lansweeper it consistently fails. Here is the error message:
Result: Deployment ended: Incorrect function. Stop(Failure). Credential: (csb\csbappservice). ShareCredential: (CSBAppService).
Command: cd /d %userprofile% cd .. for /F "tokens=*" %a in ('dir /ad/b') do cmd /c del /s/q "%a\AppData\Local\Microsoft\OneDrive"
Any help would be greatly appreciated.