Skip to content
Open

Amit #14

Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions nested/sql-vm.json
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@
"variables": {
"vmStorageAccountContainerName": "vhds",
"OSDiskName": "sql-vm-osdisk",
"psToolkitFileName": "NetApp_PowerShell_Toolkit_4.3.0.msi"
"psToolkitScriptName": "InstallNetAppPS.ps1"
},
"resources": [{
"type": "Microsoft.Storage/storageAccounts",
Expand Down Expand Up @@ -153,9 +153,9 @@
"autoUpgradeMinorVersion": true,
"settings": {
"fileUris": [
"[concat(parameters('_artifactsLocation'),'/scripts/',variables('psToolkitFileName'),parameters('_artifactsLocationSasToken'))]"
"[concat(parameters('_artifactsLocation'),'/scripts/',variables('psToolkitScriptName'),parameters('_artifactsLocationSasToken'))]"
],
"commandToExecute": "start /wait msiexec.exe /i NetApp_PowerShell_Toolkit_4.3.0.msi /qn ADDLOCAL=F.PSTKDOT"
"commandToExecute": "[concat('powershell -ExecutionPolicy Unrestricted -File',' ', variables('psToolkitScriptName'))]"
}
}
}]
Expand Down
5 changes: 5 additions & 0 deletions scripts/InstallNetAppPS.ps1
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
New-Item C:\NetApp -Type Directory
$WebClient = New-Object System.Net.WebClient
$WebClient.DownloadFile("https://raw.githubusercontent.com/SpektraSystems/NetAppAzureQuickstart/master/scripts/NetApp_PowerShell_Toolkit_4.3.0.msi","C:\NetApp\NetApp_PowerShell_Toolkit_4.3.0.msi")
# Start-Process msiexec.exe -Wait -ArgumentList '/I C:\NetApp\NetApp_PowerShell_Toolkit_4.3.0.msi /quiet'
Invoke-Command -ScriptBlock { & cmd /c "msiexec.exe /i C:\NetApp\NetApp_PowerShell_Toolkit_4.3.0.msi" /qn ADDLOCAL=F.PSTKDOT}
9 changes: 8 additions & 1 deletion scripts/netapp_connect_ontap_win.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -285,11 +285,18 @@ $scriptlogfilepath = 'C:\WindowsAzure\Logs\SQLNetApp_Connect_Storage.ps1.txt'
(get-content $azurelogfilepath) | % { $_ -replace $password, 'passwordremoved' } | set-content $azurelogfilepath
(get-content $scriptlogfilepath) | % { $_ -replace $password, 'passwordremoved' } | set-content $scriptlogfilepath
}

function Install-NetAppPSToolkit([String]$password)
{
New-Item C:\NetApp -Type Directory
$WebClient = New-Object System.Net.WebClient
$WebClient.DownloadFile("https://raw.githubusercontent.com/SpektraSystems/NetAppAzureQuickstart/master/scripts/NetApp_PowerShell_Toolkit_4.3.0.msi","C:\NetApp\NetApp_PowerShell_Toolkit_4.3.0.msi")
Invoke-Command -ScriptBlock { & cmd /c "msiexec.exe /i C:\NetApp\NetApp_PowerShell_Toolkit_4.3.0.msi" /qn ADDLOCAL=F.PSTKDOT}
}

## Starting functions execution

$SVMPwd = $OTCpassword
Install-NetAppPSToolkit
Get-ONTAPClusterDetails $email $password $ocmip
Connect-ONTAP $AdminLIF $iScSILIF $SVMName $SVMPwd $Capacity
Load-SampleDatabase
Expand Down