Skip to content
This repository has been archived by the owner on Jun 17, 2024. It is now read-only.

This script fails consistently when i run it under a SQL Job #11

Open
dmayi opened this issue May 15, 2018 · 1 comment
Open

This script fails consistently when i run it under a SQL Job #11

dmayi opened this issue May 15, 2018 · 1 comment

Comments

@dmayi
Copy link

dmayi commented May 15, 2018

I am able to run this script successfully on Powershell console. But my use case is to run this from a SQL job for a scheduled refresh of my PowerBI report. That is not working for me. Any hints please? Thanks

@richardlhughes
Copy link

Try running in CmdExec

@command=N'powershell.exe -ExecutionPolicy Bypass -Command "Import-Module ...

Maybe this will help.
https://www.sqlhammer.com/running-powershell-in-a-sql-agent-job/

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants