Windows 10: OneDrive on Demand with PowerShell-Script

Discus and support OneDrive on Demand with PowerShell-Script in Windows 10 Network and Sharing to solve the problem; Would like to use a PS-Script to keep some files and Folders Always online and some offline. But it does not work properly. E.g. to keep it offline,... Discussion in 'Windows 10 Network and Sharing' started by Martin_S_, Mar 2, 2020.

  1. Martin_S_ Win User

    OneDrive on Demand with PowerShell-Script


    Would like to use a PS-Script to keep some files and Folders Always online and some offline. But it does not work properly. E.g. to keep it offline, here my Script:


    $Offline = @
    "$env:OneDrive\Dokumente\folder\*",
    "$env:OneDrive\Dokumente\file.xlsx"


    ForEach $listOff in $Offline {
    attrib +p -u $listOff /s
    }



    When I change it to "attrib +s +h +p -u then it worked, but with some negative side-effects. some files then are hidden or systemprotected.


    Thanks for any help

    :)
     
    Martin_S_, Mar 2, 2020
    #1
  2. S.D.K Win User

    File History & OneDrive on Demand

    I know that "files on demand" aren't saved on my computer. However, I still have the following problems:

    • After starting a new File History backup from scratch (as suggested in the first response) the majority of my Onedrive , including almost all files that are marked as "Always Keep on this Device" are not backed up.
    • Even for files marked as "Files on Demand" - surely File History should be able to back them up anyway? The whole point of a good backup system is that you have copies of files in multiple places (and OneDrive's cloud system only counts as 1). The creation
      of the file history would be download heavy as it copies every file to my backup device, but after that it should only have to download single files as changes are made.
     
    S.D.K, Mar 2, 2020
    #2
  3. 5a5d6cb6-7934-4184-8f8b-e1d16573aa87, Mar 2, 2020
    #3
  4. OneDrive on Demand with PowerShell-Script

    PowerShell scripts not working with Call operator

    Hi,



    Thank you for writing to Microsoft Community Forums.



    I understand that you are facing issues while developing a PowerShell script using the Call operator. I would suggest you to refer the articles

    The Windows PowerShell ISE
    .



    However, as the issue is related to developing PowerShell scripts, I would suggest you to post your query on

    MSDN forums
    , where we have expertise and developers who are well equipped with the knowledge of developing PowerShell scripts in Windows.



    Regards,

    Prakhar Khare

    Microsoft Community – Moderator
     
    Prakhar_Khare, Mar 2, 2020
    #4
Thema:

OneDrive on Demand with PowerShell-Script

Loading...
  1. OneDrive on Demand with PowerShell-Script - Similar Threads - OneDrive Demand PowerShell

  2. Issue in Powershell script

    in Windows 10 Gaming
    Issue in Powershell script: HI Team,We have a power shell script. It will check if the user is available in the ACL list of ADL. To get the ACL list, we are connecting to the Azure Datalake storage using Connect-AzAccount and authenticating with SPN. To get the group member details, we authenticate the...
  3. Issue in Powershell script

    in Windows 10 Software and Apps
    Issue in Powershell script: HI Team,We have a power shell script. It will check if the user is available in the ACL list of ADL. To get the ACL list, we are connecting to the Azure Datalake storage using Connect-AzAccount and authenticating with SPN. To get the group member details, we authenticate the...
  4. PowerShell script

    in Windows 10 Support
    PowerShell script: The code below tests a series of IPs in a txt file.The result is as follows and is written in a txt file. 19.191.12.161 - online 19.191.12.162 - offline 19.191.12.163 - offline 19.191.12.164 - offline 19.191.12.165 - offline also see the scrennshot Code: $Output= @()$GetIP =...
  5. powershell scripts

    in AntiVirus, Firewalls and System Security
    powershell scripts: Hi, I have azure. Someone is somehow installing powershell scripts onto my computer that allows them to host my PC through P2P and UDP connections, well I think so anyway. I have only just found powershell script entry changes in my registry by accident. These criminals...
  6. powershell script

    in Windows 10 Customization
    powershell script: looking for a script to monitor for a folder, if there is a file in that folder send it as an email, once the email is sent out, confirm and then move the files to an archive folder. monitor c:\test\*.pdf No files, do not send email. Yes Files, send an email to someone at...
  7. Powershell Script on Shutdown

    in Windows 10 Performance & Maintenance
    Powershell Script on Shutdown: Hi all, I try to run a Powershell Script (*.ps1) when i shut down my PC. I created the script and it is working fine when i run it. However if i want to run it on a regular Shutdown it seems like it does not start or is not finished, before Windows is killing every running...
  8. A Powershell Script for HandBrake

    in Windows 10 Software and Apps
    A Powershell Script for HandBrake: Here's the thing. My system is an age-old i3-530 overclocked to 3.5GHz coupled with GTX 1050 2GB. I have around 1.5TB of tutorial videos that I have to encode due to dearth in HDD space. I want to encode the videos while keeping the folder and subfolder structure intact....
  9. OneDrive's Files On-Demand not working?

    in Windows 10 Software and Apps
    OneDrive's Files On-Demand not working?: Hello, So I just clean installed the Fall Creators Update without any problems. I wanted to try out the OneDrive's File On-Demand feature. I noticed that I had to update OneDrive manually for that feature option to appear in OneDrive's Settings so I got the update from...
  10. PowerShell Scripting - The Basics

    in Windows 10 Tutorials
    PowerShell Scripting - The Basics: How to: PowerShell Scripting - The Basics [img] Information A PowerShell script is a collection of commands and cmdlets to be run in logical order, previous lines in script determining values and variables in command lines thereafter. The principle is the same than in...

Users found this page by searching for:

  1. how to disable onedrive on-Demand via powershell