Jump to content
Welcome to our new Citrix community!
  • 0

implement onedrive for business and remove onedrive.


Michel D

Question

1 answer to this question

Recommended Posts

  • 0

I know this is an old post, but figured it's worth mentioning what I do on my own W10 VDAs (1909 and 20H2, on 1912 LTSR CU2, non-persistent PVS):

 

  1. Download the latest OneDrive installer from Microsoft's site
  2. In my OS Layer, I install OneDrive and disable the associated task that is created. I do this in PowerShell:
    1. $var_Install_Exec = "OneDriveSetup.exe"
      $var_Install_Arg = "/allusers"
      
      $proc = Start-Process -FilePath $var_Install_Exec -ArgumentList $var_Install_Arg -WorkingDirectory $PSScriptRoot -PassThru
      Do { Start-Sleep 5 } While (Get-Process | Where ProcessName -eq OneDriveSetup.exe)
      Start-Sleep 10
      schtasks /change /tn "OneDrive Per-Machine Standalone Update Task" /disable | Out-Null

       

  3. In my Platform Layer, I disable OneDrive scheduled tasks and registry entries via Citrix Optimizer:

    1. Disable the OneDrive Standalone Update Task
      Get-ScheduledTask -TaskName 'OneDrive*Update*' | Disable-ScheduledTask
      
      Remove OneDrive Setup - Local Service
      Action: Delete Value
      Key: HKEY_USERS\S-1-5-19\Software\Microsoft\Windows\CurrentVersion\Run
      Name: OneDriveSetup
      
      Remove OneDrive Setup - Network Service
      Action: Delete Value
      Key: HKEY_USERS\S-1-5-20\Software\Microsoft\Windows\CurrentVersion\Run
      Name: OneDriveSetup
      
      Removes OneDrive System.IsPinnedToNameSpaceTree x86
      Key: HKCU\Software\Classes\CLSID\{018D5C66-4533-4307-9B53-224DE2ED1FE6}
      Name: System.IsPinnedToNameSpaceTree
      Value: 0
      Type: Dword
      
      Removes OneDrive System.IsPinnedToNameSpaceTree x64
      Key: HKCU\Software\Classes\Wow6432Node\CLSID\{018D5C66-4533-4307-9B53-224DE2ED1FE6}
      Name: System.IsPinnedToNameSpaceTree
      Value: 0
      Type: Dword
      
      Disable Microsoft OneDrive startup run
      Key: HKCU\Software\Microsoft\Windows\CurrentVersion\Explorer\StartupApproved\Run
      Name: OneDrive
      Value: 3,0,0,0,100,161,2,239,76,62,209,1
      Type: Binary
      
      Remove OneDrive Setup - HKU 1
      Action: Delete Value
      Key: HKCU\SOFTWARE\Microsoft\Windows\CurrentVersion\Run
      Name: OneDriveSetup
      
      Remove OneDrive Setup - HKU 2
      Action: Delete Value
      Key: HKCU\Microsoft\Windows\CurrentVersion\Explorer\StartupApproved\Run
      Name: OneDriveSetup
      
      Remove OneDrive Setup - HKU 3
      Action: Delete Value
      Key: HKCU\SOFTWARE\Microsoft\Windows\CurrentVersion\RunOnce
      Name: OneDrive
  4. In Citrix WEM, I create an application for OneDrive and set it to automatically start when the user logs in. The command line for this is C:\Program Files (x86)\Microsoft OneDrive\OneDrive.exe /background
    1. I do this so that I can control how OneDrive is launched One of the registry keys listed above will be able to accomplish the same, but I prefer this method
  5. The only OneDrive location that appears in File Explorer is our OneDrive for Business app - the normal OneDrive app does not appear for the users
Link to comment

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...