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“
write-host„—————————-„
Backup-SqlDatabase -Database „Demo Database NAV (7-1)“ -ServerInstance localhost\navdemo -BackupFile C:\temp\kunde.bak
Write-host„end SQL Backup“
write-host„—————————-„
Write-host„Restore SQL Backup“
write-host„—————————-„
$RelocateData=Ne…


Schreibe einen Kommentar

Your email address will not be published.

*

code