Windows 10: Unable to uninstall OneDrive from Domain computer using a batch script

Discus and support Unable to uninstall OneDrive from Domain computer using a batch script in Windows 10 Customization to solve the problem; Hi Legends, Requirement: One drive should be uninstalled from user profiles by logon script. I hope everyone knows that one drive is getting... Discussion in 'Windows 10 Customization' started by nagapandi, Mar 8, 2019.

  1. nagapandi Win User

    Unable to uninstall OneDrive from Domain computer using a batch script


    Hi Legends,

    Requirement: One drive should be uninstalled from user profiles by logon script.


    I hope everyone knows that one drive is getting installed in user profile from the setup available in

    "Systemroot/syswow or system32/onedrivesetup.exe".

    I am trying to uninstall one drive from user profiles by creating a batch script. But, we are unable to pass admin credentials in script for allowing logon script to uninstall onedrive. It popsup UAC and it is not possible to enter credentials on all user machines and profiles manually.

    Is there a way to achieve it instead of disabling or blocking through group policy?



    ***Modified title from: Need Help to uninstall onedrive from domain user accounts***

    :)
     
    nagapandi, Mar 8, 2019
    #1

  2. Windows 10 - OneDrive

    Right click on the app and one of the properties has an option to not automatically start it. Uncheck, restart the computer, and it should stop. If you want to go another step further, find the OneDrive app in the start menu, right click on it and uninstall.

    If that is still insufficient, there is a batch uninstaller for OneDrive available online. I can copy the code here if you need it.
     
    FordGT90Concept, Mar 8, 2019
    #2
  3. eve wang Win User
    Unable to uninstall Onedrive For Business

    OneDrive can be uninstalled from some versions of Windows 10:

    1. Select the Start button, type Programs in the search box, and then select Add or remove programs in the list of results.
    2. Under Apps & features, find and select Microsoft OneDrive, and then select Uninstall.

    As OneDrive is built in to some versions of Windows and can't be uninstalled. As a workaround, you can hide it. Reference “Turn off or uninstall OneDrive” for detail steps:
    Turn off, disable, or uninstall OneDrive
     
    eve wang, Mar 8, 2019
    #3
  4. Unable to uninstall OneDrive from Domain computer using a batch script

    Running PowerShell script as a batch file

    Hello Baldo,



    Thank you for writing to Microsoft Community Forums.



    I understand that you want to execute the PowerShell commands as a batch file.



    I tried executing the batch file on my machine but I was unable to execute it as the command was incomplete. However, after making some changes in the command I was able to execute the batch file.



    You can try the following command by saving it in a batch file and check if that helps.



    powershell –Command Get-AppxPackage Microsoft.3dBuilder | Remove-AppxPackage



    Also, as the query is related to running a PowerShell script using a batch file, I suggest you to post the issue on

    TechNet
    forums where we have professionals who have more knowledge about the issue.



    Hope it helps.



    Regards,

    Prakhar Khare

    Microsoft Community – Moderator
     
    Prakhar_Khare, Mar 8, 2019
    #4
Thema:

Unable to uninstall OneDrive from Domain computer using a batch script

Loading...
  1. Unable to uninstall OneDrive from Domain computer using a batch script - Similar Threads - Unable uninstall OneDrive

  2. Need help on batch script to shutdown computers from list

    in Windows 10 Gaming
    Need help on batch script to shutdown computers from list: Hi, I would need help to write a bat file to shutdown all the computers listed in the text file. Can someone help me please?This script will extract the list of computers name from the text file and loop to shutdown each computer....
  3. Need help on batch script to shutdown computers from list

    in Windows 10 Customization
    Need help on batch script to shutdown computers from list: Hi, I would need help to write a bat file to shutdown all the computers listed in the text file. Can someone help me please?This script will extract the list of computers name from the text file and loop to shutdown each computer....
  4. Batch scripting

    in Windows 10 Software and Apps
    Batch scripting: Hi, here's the code that I used for 3 DISM commands to start automatically after pressing a key:Code and result:Code:@echo off echo You are going to use DISM. echo 1. To check the image. echo 2. Scan your PC's health echo 3. Restore your PC'S health. echo To continue, press...
  5. Batch scripting

    in Windows 10 Gaming
    Batch scripting: Hi, here's the code that I used for 3 DISM commands to start automatically after pressing a key:Code and result:Code:@echo off echo You are going to use DISM. echo 1. To check the image. echo 2. Scan your PC's health echo 3. Restore your PC'S health. echo To continue, press...
  6. Batch scripting

    in Windows 10 Network and Sharing
    Batch scripting: Hi, here's the code that I used for 3 DISM commands to start automatically after pressing a key:@echo off echo You are going to use DISM. echo 1. To check the image. echo 2. Scan your PC's health echo 3. Restore your PC'S health. echo To continue, press any key. echo Before...
  7. Powershell script to remove computer from Domain

    in Windows 10 Gaming
    Powershell script to remove computer from Domain: Hello,I am trying to remove computers from the domain with a powershell script.I will be using the Local Admin. credentials to remove the devices from the domain so users don't have to type in anythingI have encrypted the password with the following commands:Creating the...
  8. Powershell script to remove computer from Domain

    in Windows 10 Software and Apps
    Powershell script to remove computer from Domain: Hello,I am trying to remove computers from the domain with a powershell script.I will be using the Local Admin. credentials to remove the devices from the domain so users don't have to type in anythingI have encrypted the password with the following commands:Creating the...
  9. Powershell script to remove computer from Domain

    in Windows 10 Customization
    Powershell script to remove computer from Domain: Hello,I am trying to remove computers from the domain with a powershell script.I will be using the Local Admin. credentials to remove the devices from the domain so users don't have to type in anythingI have encrypted the password with the following commands:Creating the...
  10. Batch script to automatically uninstall and Reinstall a driver

    in Windows 10 Drivers and Hardware
    Batch script to automatically uninstall and Reinstall a driver: For some strange reason I've had a faulty external Seagate 8TB driver/HDD for the last year The problem is this: everytime I reboot the computer, the HDD is not automatically recognized so I have to do this 1. Open Device Manager 2. Remove the USB attached SCSI mass storage...