Help a SQL Guy out


hello powershell people. new power shell world , running issue on script running in job , don't understand going on. script last script run in sql agent job , error message this: 

"a job step received error @ line 1 in powershell sccript. corresponding line 'set-executionpolicy remotesigned -scope process -force". error information returned powershell is: "security error"

the script supposed run below. of course try research , if can find answer let know appreciated. thanks.

if ('$(escape_squote(inst))' -eq 'mssqlserver') {$a = '\default'} else {$a = ''};  (get-item sqlserver:\sqlpolicy\$(escape_none(srvr))$a).erasesystemhealthphantomrecords()

hi,

thanks post, post received error "a job step received error @ line 1 in powershell sccript. corresponding line 'set-executionpolicy remotesigned -scope process -force". error not related post script seems issue related execution policy set.

the remotesigned execution policy require scripts , configuration files downloaded internet signed trusted publisher.

would please verify , can refer below link more reference:

https://technet.microsoft.com/en-us/library/ee176961.aspx?f=255&mspperror=-2147217396

best regards,

elaine


please remember mark replies answers if , unmark them if provide no help. if have feedback technet subscriber support, contact tnmff@microsoft.com.



Windows Server  >  Windows PowerShell



Comments

Popular posts from this blog

server manager error: ADAM.events.xml could not be enumerated.

Cannot access Anywhere Access using domain name?

WMI Failure: Unable to update Local Resource Group