Workaround: ‘sqlps’ and "Test-Path" PowerShell cmdlet on a UNC path

Related Forum thread:

Related Connect feedback:

When Test-Path cmdlet is run in SQL Powershell from the context of SQL Powershell provider path, Test-Path returns False. We see the same behavior with Registry Window Powershell provider as well

Specify literal path while using Test-Path cmdlet
test-path -literalpath "FileSystem::\\machine\uncpath"


Comments (1)

  1. David Lundell says:

    Thanks a bunch — couldn't figure out why Test-Path wasn't working in my SQL agent job.

Skip to main content