This guide explains how to run the Test-VAShareAccess.ps1 script to validate:
- ✔ Account access to shared folders
- ✔ Folder-level permissions (reach/list)
- ✔ Optional write access (create/delete test file)
- ✔ Export results for documentation (CSV)
Place the following files in the same folder:
- Test-VAShareAccess.ps1
- accounts.txt
- shares.txt
Add one account per line using VA domain format:
- VA\OITXXXIA
- VA\OITXXXIU
- VA\OITXXXIU2
⚠️ Use the exact account names assigned by your site or team.
Add one UNC path per line.
\server01\DICOM\Scratch \server02\Imaging\Imports
- ✔ Use real server/share paths from your environment
- ✔ Subfolders are supported
- ❌ Do NOT use local paths (e.g.,
C:\)
- Click Start
- Search for PowerShell
- Open it (no admin required)
cd "C:\Path\To\Your\Script"cd "C:\Temp\ShareAccessTest".\Test-VAShareAccess.ps1- Prompts for each account password
- Tests access to each share
- Does NOT modify anything
.\Test-VAShareAccess.ps1 -EnableWriteTest- Creates a temporary file
- Deletes it immediately
- Confirms write/modify access
⚠️ Only use if permitted to create/delete files in those folders.
--- ## 📊 Export Results to CSV
.\Test-VAShareAccess.ps1 -EnableWriteTest -ExportCsv.\ShareAccessResults.csv
| Field | Description |
|---|---|
| CanMap | Account authenticated to share |
| CanReach | Folder path is accessible |
| CanList | Can browse contents |
| CanWrite | Can create files |
| CanDelete | Can delete files |
| PermissionSummary | Final access level |
| Result | Meaning |
|---|---|
| Modify (Write/Delete) | Full access |
| Write Only | Can create but not delete |
| Read/List Access | Read-only access |
| Traverse Only | Limited (no listing) |
| No Access | Blocked (auth/share/ACL issue) |
Multiple connections to a server using different credentials
net use * /delete- Account not added to NTFS permissions
- Share permissions missing
- Incorrect folder path
The network path was not found
- Server unreachable
- DNS issue
- Invalid UNC path
- Run in a clean session (clear
net useif needed) - Ensure accounts are added to:
- ✔ NTFS Security tab
- ✔ Share permissions (if restricted)
- Use CSV export for ticketing and documentation
.\Test-VAShareAccess.ps1 -EnableWriteTest -ExportCsv- Add accounts to
accounts.txt - Add site SMB paths to
shares.txt - Run script in PowerShell
- Review output or export CSV