Powershell script
Open the PowerShell IDE, copy the below script to map an Azure Document Store to Z drive:
net use /delete Z:
cmdkey /delete:"mystorageaccount.file.core.windows.net"
cmdkey /add:"mystorageaccount.file.core.windows.net" /user:"localhost\username" /pass:"myKey"
New-PSDrive -Name Z -PSProvider FileSystem -Root "\\mystorageaccount.file.core.windows.net\mystorageaccountFileShareName" -Persist
Data you will need before running the script, outlined in bold above is:
- mystorageaccount
- username (storageaccount name)
- myKey
- mystorageaccountFileShareName
Either visit the Azure Portal and generate a script, or manually substitute the values from your Azure Portal.
Option 1 Generate Script
- Open the Azure Portal
- Find the Storage Account
- Find the File Shares:
- Choose a File Share
- Click Connect
- Click 'Show Script' button
- Copy script
- Open PowerShel IDE (do not open as Administrator)
- Paste script
- Run
- Open Windows Explorer to confirm the drive is mapped.
2 Storage account and key (Azure Portal):
mystorageaccount
Is in the 'Storage account name' field in the screen shot below
username
Is the same as mystorageaccount
myKey
Is the "Key" value under "key1". Careful not to click 'Refresh' - this will reset and block all access - which can be useful when a staff member leaves and you wish to remove access, but all users will need to re-run the updated script with a new key.
mystorageaccountFileShareName: File share Name
In the screen shot the mystorageaccountFileShareName is "insol6", copy the value from your Azure Portal
Trusted Sites - Workstation Settings
To allow Insol6 document production and prevent warnings when using the online shared drives, add the following to trusted sites to Windows workstation security settings:
Add into the Internet Options Security as a trusted site.
Comments
0 comments
Please sign in to leave a comment.