Good afternoon -
I created a simple PoSH script in 'Run Scripts' to create a local account on some PCs. Simply speaking, it returns an Exit Code of 0 but it's not creating the account on the client. I ran the script locally on a client to test it and it works, but it just doesn't work via SCCM. I think I'm forgetting something..what, I don't know. (I'm still learning SCCM). I have another script, created 4-5yrs ago, which does the same exact thing, and it works. I just copied that code and modifed the user/pwd for my current needs. I approved it, then thought I could rt-click a Client > Run Script, and it would just work. But, it isn't. What am I forgetting/missing? It's not like Applications where you have to Distribute a Script to the DP, correct? Or, do you? My version of SCCM is 2207. I did spend a couple hours searching around the Webz and it seems to be Scripts are straightforward. Just create. Approve. Run. But, for some reason...this new Script isn't working. A final bit of info - I did check the Script.log on the Client and see PoSH is at least attempting to execute this new script. There are no errors or warnings or anything. I get the same log output when running this failed script as the other working scripts. Also, when I run the working script...it provides 'details/output' after it runs in the Run Script wizard/Script Status window in SCCM. When I run the new Script...it doesn't generate output. But, it does return an Exit Code of 0. Again, any ideas?
Thanks all.