Running Script in SCCM

Ricardo Gonçalves 0 Reputation points
2024-02-08T07:50:41.8466667+00:00

Hello, I am working with SCCM for the first time, and I've been tasked to run a powershell a script to gather information from machines across my company. I followed this tutorial (https://learn.microsoft.com/en-us/mem/configmgr/apps/deploy-use/create-deploy-scripts) and used one of the scripts suggested ("Write-Output (Get-WmiObject -Class Win32_operatingSystem).Caption") to make sure everything was working before executing the main script. However, after setting it up and approving it (in the Software Library), I tried to run the script in one of the device collections and it didn't run in any of hte devices (The SCCM clients are all Windows Servers). I have checked the client logs, but I didn't find any meaningful information. Since I'm not the responsible for SCCM here, I would like to get this sorted without messing around with too many configurations. Thank you in advance User's image

Microsoft Configuration Manager
PowerShell
PowerShell
A family of Microsoft task automation and configuration management frameworks consisting of a command-line shell and associated scripting language.
1,862 questions
{count} votes

2 answers

Sort by: Most helpful
  1. Garth Jones 1,566 Reputation points MVP
    2024-02-08T13:19:00.5233333+00:00

    So OS caption is already collect as part of Hardware inventory and there are even built-in report for OS details. Have you looked at them?


  2. XinGuo-MSFT 12,476 Reputation points
    2024-02-13T02:11:44.9666667+00:00

    Hi,

    I can run your scripts successfully. How did the Run details show on your end?

    User's image