Im trying to force reboot machines that have not been rebooted for a period of time (14 days ) . I have a powershell Script that i got it from another resource and i made some adjustment to it to fit my company's requirement . The problem that i have is that SCCM does not read the return code from Powershell . Here is what i have so far
1- A script to detect machines that have not rebooted for 14 days , if its true then it ll exit with 3010 code ( the 3010 code is a SCCM behavior for soft reboot)
2- A SCCM application deployed to all clients with the following parameter
- in the package proprieties , i have it setup to determine behavior based on
return Code ( which should be 3010 )
Script works fine except that once the script is completed I need SCCM 2012 to get a exit code of 3010 so that it would schedule a restart of the PC. Could you please help .