Note
Access to this page requires authorization. You can try signing in or changing directories.
Access to this page requires authorization. You can try changing directories.
Question
Wednesday, January 9, 2019 3:44 PM
Hi All,
I would like to ask for a command that I can be use to deploy a powershell script that will install SNMP features and community string. I already have a powershell script that can be perfectly run manually.
* "C:\Windows\System32\WindowsPowerShell\v1.0\powershell.exe" -executionpolicy bypass -command ".\SNMPserver2008 R2.ps1"
* powershell.exe -executionpolicy bypass -command ".\SNMP server2008 R2.ps1"
* powershell.exe -executionpolicy bypass -file "\server1\OSD\utility scripts\SNMP server2008 R2-other.ps1"
I tried the above commands but none successfully added SNMP feature on test server.. Report: "Status of a specified package and program deployment" showed that the test server received the package, but failing to install and didn't rerun even the configuration used "Rerun for failed deployment"
All replies (3)
Wednesday, January 9, 2019 4:03 PM | 1 vote
Hi,
Does the script work when you run it in System context? using for example PSExec to test it out? As the program runs in System Context.
It will only rerun if failed if there is a deployment schedule that tell it to run so if you set it to run as soon as possible it will not rerun until a new scheduled run is found.
Regards,
Jörgen
-- My Enterprise Mobility blog ccmexec.com -- Twitter @ccmexec
Wednesday, January 9, 2019 4:14 PM | 1 vote
Hi All,
I would like to ask for a command that I can be use to deploy a powershell script that will install SNMP features and community string. I already have a powershell script that can be perfectly run manually.
* "C:\Windows\System32\WindowsPowerShell\v1.0\powershell.exe" -executionpolicy bypass -command ".\SNMPserver2008 R2.ps1"
* powershell.exe -executionpolicy bypass -command ".\SNMP server2008 R2.ps1"
* powershell.exe -executionpolicy bypass -file "\server1\OSD\utility scripts\SNMP server2008 R2-other.ps1"
I assume you're using package/program right? The last one which refers to \server won't work unless you've given the machine in case correct permission to the fileshare (= not the way to do it anyway). The one that *should* work correctly would be the second line, although without seeing what's in the script hard to say why it isn't working..
Wednesday, April 3, 2019 4:50 PM | 1 vote
You can try using: %WINDIR%\Sysnative\WindowsPowerShell\v1.0\powershell.exe" -executionpolicy bypass -command ".\SNMPserver2008 R2.ps1".
If you check the log execmgr.log will tell you the why is failing the package.