how to backup a database from clients via Windows PowerShell

You may need to backup a database remotely via Windows Power Shell.

First of all, you have to install SQL Server PowerShell applet to local machines.

to verify if Applet exists:

1 - Open Windows PowerShell (It is highly recommended to open it with Administrator)
2 - Enter sqlps, if you get an error about unrecognized command. You have to install SQL Client tools or any other feature from SQL Server Installation Disc. (Feature based installation covers necessary Power Shell Scripts)

Second, execute below commands over Windows PowerShell to backup a database;

PS C:\Users\[....]> sqlps
Microsoft (R) SQL Server (R) PowerShell
Version 12.0.2000.8
Copyright (c) 2014 Microsoft. All rights reserved.

PS SQLSERVER:\>; Backup-SqlDatabase -ServerInstance dbaseServer050 -Database CrmOrganization_MSCRM -BackupFile \\ShareMap\BackupTemp\CrmOrganization_MSCRM.bak

PS SQLSERVER:\>


Good Luck...

Comments

Popular posts from this blog

Could not load file or assembly 'System.ServiceModel, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089'. The system cannot find the file specified at Configuration class initiation in CrmServiceHelper.cv

Exception caught instantiating TERADATA report server extension SQL Reporting Services

you face "ISV code aborted the operation" when you change status of the any record in Dynamics CRM 2013