need help creating a PS script to do full backups; when running the get-pssnappin windows.serverbackup I receive a PS snapin does not exsist

J3ffyB01 1 Reputation point
2022-11-22T19:52:50.63+00:00

I am currently creating a script to backup my windows servers, but I am running into issues with the server backup snap-in. the error message i get is

get-pssnapin : No Windows PowerShell snap-ins matching the pattern 'windows.serverbackup' were found. Check the
pattern and then try the command again.
At line:1 char:1

  • get-pssnapin windows.serverbackup
  • ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  • CategoryInfo : InvalidArgument: (windows.serverbackup:String) [Get-PSSnapin], PSArgumentException
  • FullyQualifiedErrorId : NoPSSnapInsFound,Microsoft.PowerShell.Commands.GetPSSnapinCommand

my main objective is to create a PS script that does a onetime backup, using task scheduler to run it at certian intervals

Windows for business | Windows Server | Devices and deployment | Set up, install, or upgrade
Windows for business | Windows Server | User experience | PowerShell
0 comments No comments
{count} votes

1 answer

Sort by: Most helpful
  1. Rich Matheisen 47,901 Reputation points
    2022-11-22T22:25:23.053+00:00

    Snap-ins are passe, to say the least.

    I think you're looking for the WindowsServerBackup module: windowsserverbackup

    0 comments No comments

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.