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

PowerShellNoob1234 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 Server Backup
Windows Server Backup
Windows Server: A family of Microsoft server operating systems that support enterprise-level management, data storage, applications, and communications.Backup: A duplicate copy of a program, a disk, or data, made either for archiving purposes or for safeguarding valuable files from loss should the active copy be damaged or destroyed.
454 questions
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,388 questions
0 comments No comments
{count} votes

1 answer

Sort by: Most helpful
  1. Rich Matheisen 45,096 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