
Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎09-02-2020 10:17 PM
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.
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.
Labels:
- Labels:
-
General Discussion
3 REPLIES 3

Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎03-05-2023 08:17 AM
It may be limited by a project at work, you can try to use OpenAI Playground to solve this problem

Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎09-04-2020 07:14 AM
Have you disabled it via Group Policy or Registry first to disable it from launching / being installed.
https://www.minitool.com/backup-tips/how-to-disable-onedrive.html
https://www.minitool.com/backup-tips/how-to-disable-onedrive.html

Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎09-04-2020 07:12 AM
Are you attempting to run that as the user account vs SYSTEM or scanning account.
As OneDrive installs on the machine under the local user profile the command will need to be run under the user account.
As OneDrive installs on the machine under the local user profile the command will need to be run under the user account.
