Use powershell to set up Windows 10 Backup

ode2code 21 Reputation points
2020-11-12T17:22:08.64+00:00

Update: I actually found this post where Christian Grue asks the same question. That was in 2017. Is this still the case in 2020?

Original Post:

I've found a number of articles on how to make a Powershell backup script, such as

https://social.technet.microsoft.com/wiki/contents/articles/53074.file-backup-with-powershell.aspx, and

https://medium.com/@pablo127/how-do-i-make-quick-automatic-backup-with-using-powershell-9fa8de3f1784.

However, these scripts include the actual backup routine. I'm not against this approach, but before I choose it, I was wondering if the Powershell API is capable of configuring the built-in Windows 10 Backup utility directly?

Here's my scenario, if that clarifies my project: We have a number of deployed systems on customer premises, and I need to retroactively configure backups of our application's data folder to a network share. These systems are nearly identical, and the only wildcard is the destination network share and its credentials.

P.S. I originally posted this question in the System Center Data Protection Manager forum, and was redirected here by a moderator. If this is still not the right forum, I would appreciate some help to get to the right place.

Windows Server PowerShell
Windows Server PowerShell
Windows Server: A family of Microsoft server operating systems that support enterprise-level management, data storage, applications, and communications.PowerShell: A family of Microsoft task automation and configuration management frameworks consisting of a command-line shell and associated scripting language.
5,508 questions
0 comments No comments
{count} votes

Accepted answer
  1. Ian Xue (Shanghai Wicresoft Co., Ltd.) 36,336 Reputation points Microsoft Vendor
    2020-11-13T05:17:47.41+00:00

    Hi,

    If you want to create a backup schedule in Windows 10 you can run wbadmin enable backup
    For more details you can refer to this link
    https://learn.microsoft.com/en-us/windows-server/administration/windows-commands/wbadmin-enable-backup

    Best Regards,
    Ian

    ============================================

    If the Answer is helpful, please click "Accept Answer" and upvote it.
    Note: Please follow the steps in our documentation to enable e-mail notifications if you want to receive the related email notification for this thread.


1 additional answer

Sort by: Most helpful
  1. Andreas Baumgarten 108K Reputation points MVP
    2020-11-12T22:27:38.39+00:00

    Not a PowerShell cmdlet but you can use the wbAdmin command for this:

    # Creates a backup of C: and all required partitions and stores the backup on F:
    wbAdmin start backup -backupTarget:F: -include:C: -allCritical -quiet
    
    # Creates a backup of C: and all required partitions and stores the backup on a remote computer
    wbAdmin start backup -backupTarget:\\[Remote-Computer]\[Share] -include:C: -allCritical –quiet
    

    (If the reply was helpful please don't forget to upvote and/or accept as answer, thank you)

    Regards
    Andreas Baumgarten


Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.