I wrote a small script to collect SQL server versions and services, put it into a script and it is being called by a .cmd file (basically passing the computername to powershell to create the output file).
When executing the .cmd file I get the security warning:
Run only scripts that you trust. While scripts from the Internet can be useful,
this script can potentially harm your computer. Do you want to run abc.ps1?
I've read that v2 has a switch to ignore this message, is there a work-around on v1?
yes I have another one-liner that sets the executionpolicy unrestricted
Also, on one test server (also v1) this warning doesn't come up.
Thanks!!