PowerShell NAV 2013 R2: Demo Script: CopyNAVEnviroment

Hi all, as promised in the last live meeting here is the script to create a copy from an existing NAV 2013 R2 environment.

Of course there is space for improvements inside the script (using variables instead of hardcoded names and create a method), but this could be done by yourself whenever you like 😉

(Properly you need to import the nav and sql module :

  • import-module [path to NAV Management.dll]
  • import-module sqlps – verbose )
Write-host„Start SQL Backup“
Backup-SqlDatabase -Database „Demo Database NAV (7-1)“ -ServerInstance localhost\navdemo -BackupFile C:\temp\kunde.bak
Write-host„end SQL Backup“
Write-host„Restore SQL Backup“

Kommentar hinterlassen

Deine E-Mail-Adresse wird nicht veröffentlicht. Erforderliche Felder sind mit * markiert