Functions/Set-LocalBakFileNameFromServerBakFileName.ps1
<#
.SYNOPSIS Set local bak file name of server bak file name .DESCRIPTION .EXAMPLE Set-LocalBakFileNameFromServerBakFileName -ServerBakFileName "Y:\P4\LastCheckedIn\dev\DevNL_1234.bak" -LocalSQLBackupFolder "C:\MSSQL\BCK" .PARAMETER ServerBakFileName Path name of the server backup file .PARAMETER LocalSQLBackupFolder Path name of the local backup file folder #> function Set-LocalBakFileNameFromServerBakFileName { [cmdletbinding()] param ( [parameter(Mandatory=$true)] [string] $ServerBakFileName, [parameter(Mandatory=$true)] [string] $LocalSQLBackupFolder ) PROCESS { $BakFileItem = Get-Item $ServerBakFileName $LocalFilePath = "{0}\{1}" -f $LocalSQLBackupFolder, $BakFileItem.Name return $LocalFilePath } } Export-ModuleMember -Function Set-LocalBakFileNameFromServerBakFileName |