Open fmms opened 6 years ago
Hello Felix!
This is unusual: I’ve not seen other uses of salt have this issue. Is this runnning through PowerShell window, or VS Code, or PowerShell Console? How about through TeamCity/VSTS etc? What version of PowerShell? Is a custom profile loaded prior?
Hi @RichieBzzzt ,
we had a long talk at the sqlbits. ;)
So the PowerShell version
Name Value
---- -----
PSVersion 5.1.15063.1155
PSEdition Desktop
PSCompatibleVersions {1.0, 2.0, 3.0, 4.0...}
BuildVersion 10.0.15063.1155
CLRVersion 4.0.30319.42000
WSManStackVersion 3.0
PSRemotingProtocolVersion 2.3
SerializationVersion 1.1.0.1
All installed on Win 10.
No custom profile loaded:
# SQL Server Agent> Test-Path $profile
False
I have saved the commands from the initial post as a file called Deploy-Job.ps1
and then execute this script with .\Deploy-Job.ps1
in a PowerShell command line window.
Hello!
Sorry for being slow to respond; a mixture of holidays and the world cup have slowed down my response time.
Also the build server needed a bit of a rebuild. But now I am up and running and free of distractions I'll go through this and the other issues you have raised.
Hello! (again!)
Yes I recall our long chat, it was good to meet you!
At the moment parameters need to be set at a global level when running in PowerShell like you are: this is consistent with my testing project that I have up and running prior to each release.
I would love to change the Module so that these variables are in scope for the deployment - I'm not sure how VSTS/Octopus handle this as through their pipeline they manage it - but I don't know how!
I'll keep investigating how this is done, meanwhile I'll keep the issue open and update the documentation.
Thanks for all the feedback, it's been most useful!
I created a script named Deploy-Job.ps1
However, the variable $paramRunAs was not visible to the function functions\SetJobProperties.ps1 in line 36. I had to change the calling script to
Can the module be adapted, or should the documentation be adjusted, or did I do something wrong?
regards and thanks