Add SIKData mount ps-script
This commit is contained in:
@@ -0,0 +1,9 @@
|
||||
$connectTestResult = Test-NetConnection -ComputerName 192.168.0.4 -Port 445
|
||||
if ($connectTestResult.TcpTestSucceeded) {
|
||||
# Save the password so the drive will persist on reboot
|
||||
cmd.exe /C "cmdkey /add:`"192.168.0.4`" /user:`"Azure\sikdata`” /pass:`"43M1Sa3+rd1e5SJl2FXp+IfcuBISrsq6CWJ0hbEP3bgRrQKNsJc9BoCCcwZ8CEEu9jzEFlHUbu/bGNpBDPlYlw==`""
|
||||
# Mount the drive
|
||||
New-PSDrive -Name Z -PSProvider FileSystem -Root "\\192.168.0.4\sikdata" -Persist
|
||||
} else {
|
||||
Write-Error -Message "Unable to reach the Azure storage account via port 445. Check to make sure your organization or ISP is not blocking port 445, or use Azure P2S VPN, Azure S2S VPN, or Express Route to tunnel SMB traffic over a different port."
|
||||
}
|
||||
Reference in New Issue
Block a user