I want to execute a powershell script within microsoft management studio. But I get an error. Look below for more details:
EXEC master..xp_cmdshell '%SYSTEMROOT%\System32\WindowsPowerShell\v1.0\powershell.exe -ExecutionPolicy unrestricted -command "C:\tmp_es\test.ps1"'
C:\tmp_es\test.ps1 : The term 'C:\tmp_es\test.ps1' is not recognized as the
name of a cmdlet, function, script file, or operable program. Check the
spelling of the name, or if a path was included, verify that the path is
correct and try again.
C:\tmp_esTry changing the permission ontmp_esto read all users.