@Mr727478 Ok, a year afterwards you probably found out, but I'm sure you're not the only one with this problem and I find that video very useful, so you just execute "set-executionpolicy remotesigned" from the ps and than ".\pig.ps1". You can also use other policies, but this is the safest for that until you know more about the ps.
@falkoz Unfortunately this does not work in some corporate environments for some strange reason (you get "Access to the registry key 'HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\PowerShell\1\ShellIds\Microsoft.PowerShell' is denied." message even if you have admin rights to your PC. You will have to actually open up the registry editor, browse to that particular key and add a new SZ string - name it ExecutionPolicy and set the value to RemoteSigned
so can you use powerscript functions witth arguments? like:
function Data(FirstName,LastName)
maam31 6 months ago
Nice tutorial. Can you please explain how I can enable the script pig.ps1 in powershell because it fails to run.
Mr727478 2 years ago
@Mr727478 Ok, a year afterwards you probably found out, but I'm sure you're not the only one with this problem and I find that video very useful, so you just execute "set-executionpolicy remotesigned" from the ps and than ".\pig.ps1". You can also use other policies, but this is the safest for that until you know more about the ps.
falkoz 1 year ago
@falkoz Unfortunately this does not work in some corporate environments for some strange reason (you get "Access to the registry key 'HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\PowerShell\1\ShellIds\Microsoft.PowerShell' is denied." message even if you have admin rights to your PC. You will have to actually open up the registry editor, browse to that particular key and add a new SZ string - name it ExecutionPolicy and set the value to RemoteSigned
jamesjiao 8 months ago