18. Februar 2015 01:51
function DigUpDatabase80Backup
{
$BasicPath = resolve-path $args
$TargetPath = (get-item $args).parent.FullName
$BackupPath = '\SQLDemoDatabase\CommonAppData\Microsoft\Microsoft Dynamics NAV\80\Database\Demo Database NAV (8-0).bak'
$Fullpath = [string]::Concat($BasicPath,$BackupPath)
Copy-Item -path $FullPath -Destination $TargetPath
Write-Host "Backup file copied to $TargetPath"
}
function DigUpDatabase71Backup
{
$BasicPath = resolve-path $args
$TargetPath = (get-item $args).parent.FullName
$BackupPath = '\SQLDemoDatabase\CommonAppData\Microsoft\Microsoft Dynamics NAV\71\Database\Demo Database NAV (7-1).bak'
$Fullpath = [string]::Concat($BasicPath,$BackupPath)
Copy-Item -path $FullPath -Destination $TargetPath
Write-Host "Backup file copied to $TargetPath"
}
function DigUpDatabase70Backup
{
$BasicPath = resolve-path $args
$TargetPath = (get-item $args).parent.FullName
$BackupPath = '\SQLDemoDatabase\CommonAppData\Microsoft\Microsoft Dynamics NAV\70\Database\Demo Database NAV (7-0).bak'
$Fullpath = [string]::Concat($BasicPath,$BackupPath)
Copy-Item -path $FullPath -Destination $TargetPath
Write-Host "Backup file copied to $TargetPath"
}
function DigUpDatabase60Backup
{
$BasicPath = resolve-path $args
$TargetPath = (get-item $args).parent.FullName
$BackupPath = '\SQLDemoDatabase\CommonAppData\Microsoft\Microsoft Dynamics NAV\60\Database\Demo Database NAV (6-0).bak'
$Fullpath = [string]::Concat($BasicPath,$BackupPath)
Copy-Item -path $FullPath -Destination $TargetPath
Write-Host "Backup file copied to $TargetPath"
}
Set-Alias du80db DigUpDatabase80Backup
Set-Alias du71db DigUpDatabase71Backup
Set-Alias du70db DigUpDatabase70Backup
Set-Alias du60db DigUpDatabase60Backup
28. Februar 2020 10:58
function DigUpDatabase160Backup
{
$BasicPath = resolve-path $args
$TargetPath = (get-item $args).parent.FullName
$BackupPath = '\SQLDemoDatabase\CommonAppData\Microsoft\Microsoft Dynamics NAV\160\Database\Demo Database NAV (16-0).bak'
$Fullpath = [string]::Concat($BasicPath,$BackupPath)
Copy-Item -path $FullPath -Destination $TargetPath
Write-Host "Backup file copied to $TargetPath"
}
Set-Alias du160db DigUpDatabase160Backup
function DigUpDatabase150Backup
{
$BasicPath = resolve-path $args
$TargetPath = (get-item $args).parent.FullName
$BackupPath = '\SQLDemoDatabase\CommonAppData\Microsoft\Microsoft Dynamics NAV\150\Database\Demo Database NAV (15-0).bak'
$Fullpath = [string]::Concat($BasicPath,$BackupPath)
Copy-Item -path $FullPath -Destination $TargetPath
Write-Host "Backup file copied to $TargetPath"
}
Set-Alias du150db DigUpDatabase150Backup
function DigUpDatabase140Backup
{
$BasicPath = resolve-path $args
$TargetPath = (get-item $args).parent.FullName
$BackupPath = '\SQLDemoDatabase\CommonAppData\Microsoft\Microsoft Dynamics NAV\140\Database\Demo Database NAV (14-0).bak'
$Fullpath = [string]::Concat($BasicPath,$BackupPath)
Copy-Item -path $FullPath -Destination $TargetPath
Write-Host "Backup file copied to $TargetPath"
}
Set-Alias du140db DigUpDatabase140Backup
function DigUpDatabase130Backup
{
$BasicPath = resolve-path $args
$TargetPath = (get-item $args).parent.FullName
$BackupPath = '\SQLDemoDatabase\CommonAppData\Microsoft\Microsoft Dynamics NAV\130\Database\Demo Database NAV (13-0).bak'
$Fullpath = [string]::Concat($BasicPath,$BackupPath)
Copy-Item -path $FullPath -Destination $TargetPath
Write-Host "Backup file copied to $TargetPath"
}
Set-Alias du130db DigUpDatabase130Backup
function DigUpDatabase110Backup
{
$BasicPath = resolve-path $args
$TargetPath = (get-item $args).parent.FullName
$BackupPath = '\SQLDemoDatabase\CommonAppData\Microsoft\Microsoft Dynamics NAV\110\Database\Demo Database NAV (11-0).bak'
$Fullpath = [string]::Concat($BasicPath,$BackupPath)
Copy-Item -path $FullPath -Destination $TargetPath
Write-Host "Backup file copied to $TargetPath"
}
Set-Alias du110db DigUpDatabase110Backup
function DigUpDatabase100Backup
{
$BasicPath = resolve-path $args
$TargetPath = (get-item $args).parent.FullName
$BackupPath = '\SQLDemoDatabase\CommonAppData\Microsoft\Microsoft Dynamics NAV\100\Database\Demo Database NAV (10-0).bak'
$Fullpath = [string]::Concat($BasicPath,$BackupPath)
Copy-Item -path $FullPath -Destination $TargetPath
Write-Host "Backup file copied to $TargetPath"
}
Set-Alias du100db DigUpDatabase100Backup
function DigUpDatabase90Backup
{
$BasicPath = resolve-path $args
$TargetPath = (get-item $args).parent.FullName
$BackupPath = '\SQLDemoDatabase\CommonAppData\Microsoft\Microsoft Dynamics NAV\90\Database\Demo Database NAV (9-0).bak'
$Fullpath = [string]::Concat($BasicPath,$BackupPath)
Copy-Item -path $FullPath -Destination $TargetPath
Write-Host "Backup file copied to $TargetPath"
}
Set-Alias du90db DigUpDatabase90Backup