-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathSample_MF_Azure_To_FTP.ps1
55 lines (49 loc) · 1.56 KB
/
Sample_MF_Azure_To_FTP.ps1
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
########################
# Variables
########################
# Job Settings
$JobName = "TestAzureToFTP"
$Direction = "FromAzureBlobToFTP"
$KeepSourceFile = $true
$KeepTempFiles = $false
# FTP Settings
$FtpServer = "ftp1-ip.westus2.cloudapp.azure.com"
$FtpFolder = "'PATH.TO.FOLDER.'"
$FtpFile = 'test file.txt' # "PREFIX" + (Get-Date -Format "MMddyy") + "SUFFIX"
$FtpCredentialPath = 'ftpcred.xml'
# Azure Settings
$AzureStorageAccountName = "jeffazureftp"
$AzureContainerName = "from-auto-hr"
$AzureFileName = $FtpFile
$AzureBlobKeyPath = "azblobkey.xml"
# Email Settings
$CustomerEmail = "[email protected]"
$AdminEmail = "[email protected]", "[email protected]"
$FromEmail = "[email protected]"
$SmtpServer = "10.10.10.15"
$SendSuccessEmail = $true
$SmtpAuthCredentialPath = "smtpcred.xml"
########################
# Run Script
########################
Push-Location
Set-Location $PSScriptRoot
.\MF_File_Transfer.ps1 -JobName $JobName `
-FtpServer $FtpServer `
-FtpFolder $FtpFolder `
-FtpFile $FtpFile `
-FtpCredentialPath $FtpCredentialPath `
-AzureStorageAccountName $AzureStorageAccountName `
-AzureContainerName $AzureContainerName `
-AzureFileName $AzureFileName `
-AzureBlobKeyPath $AzureBlobKeyPath `
-Direction $Direction `
-CustomerEmail $CustomerEmail `
-AdminEmail $AdminEmail `
-FromEmail $FromEmail `
-SendSuccessEmail:$SendSuccessEmail `
-SmtpServer $SmtpServer `
-KeepSourceFile:$KeepSourceFile `
-KeepTempFiles:$KeepTempFiles `
-SmtpAuthCredentialPath $SmtpAuthCredentialPath
Pop-Location