{"id":16566909,"url":"https://github.com/codaamok/pscmsnowflakepatching","last_synced_at":"2026-06-06T19:31:35.426Z","repository":{"id":59619959,"uuid":"536609155","full_name":"codaamok/PSCMSnowflakePatching","owner":"codaamok","description":"PSCMSnowflakePatching is a PowerShell module used to remotely invoke the install of software updates deployed to Microsoft Endpoint Configuration Manager clients.","archived":false,"fork":false,"pushed_at":"2022-09-23T23:35:28.000Z","size":75,"stargazers_count":3,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-03-05T05:37:32.436Z","etag":null,"topics":["configmgr","mecm","memcm","patching","powershell","sccm"],"latest_commit_sha":null,"homepage":"","language":"PowerShell","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"gpl-3.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/codaamok.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":"CONTRIBUTING.md","funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2022-09-14T14:10:02.000Z","updated_at":"2024-04-11T13:44:19.000Z","dependencies_parsed_at":"2023-01-18T21:15:29.715Z","dependency_job_id":null,"html_url":"https://github.com/codaamok/PSCMSnowflakePatching","commit_stats":null,"previous_names":[],"tags_count":8,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/codaamok%2FPSCMSnowflakePatching","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/codaamok%2FPSCMSnowflakePatching/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/codaamok%2FPSCMSnowflakePatching/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/codaamok%2FPSCMSnowflakePatching/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/codaamok","download_url":"https://codeload.github.com/codaamok/PSCMSnowflakePatching/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":242008713,"owners_count":20056943,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["configmgr","mecm","memcm","patching","powershell","sccm"],"created_at":"2024-10-11T21:05:02.497Z","updated_at":"2025-03-05T10:27:43.973Z","avatar_url":"https://github.com/codaamok.png","language":"PowerShell","funding_links":[],"categories":[],"sub_categories":[],"readme":"| Branch | Build status | Last commit | Latest release | PowerShell Gallery | GitHub |\n|-|-|-|-|-|-|\n| `master` | [![GitHub Workflow Status (branch)](https://img.shields.io/github/workflow/status/codaamok/PSCMSnowflakePatching/Pipeline/master)](https://github.com/codaamok/PSCMSnowflakePatching/actions) | [![GitHub last commit (branch)](https://img.shields.io/github/last-commit/codaamok/PSCMSnowflakePatching/master?color=blue)](https://github.com/codaamok/PSCMSnowflakePatching/commits/master) | [![GitHub release (latest by date)](https://img.shields.io/github/v/release/codaamok/PSCMSnowflakePatching?color=blue)](https://github.com/codaamok/PSCMSnowflakePatching/releases/latest) [![GitHub Release Date](https://img.shields.io/github/release-date/codaamok/PSCMSnowflakePatching?color=blue)](https://github.com/codaamok/PSCMSnowflakePatching/releases/latest) | [![PowerShell Gallery](https://img.shields.io/powershellgallery/dt/PSCMSnowflakePatching?color=blue)](https://www.powershellgallery.com/packages/PSCMSnowflakePatching) | [![GitHub all releases](https://img.shields.io/github/downloads/codaamok/PSCMSnowflakePatching/total?color=blue)](https://github.com/codaamok/PSCMSnowflakePatching/releases) |\n\n**PSCMSnowflakePatching** is a PowerShell module used to remotely invoke the install of software updates deployed to Microsoft Endpoint Configuration Manager clients.\n\nWith this module you can:\n\n- Pass a list of one or more computer names, a ConfigMgr device collection ID, or interactively choose a ConfigMgr device collection\n- For each host, invoke the install of all software updates deployed to it\n- See realtime feedback and result from each patch job written to the PowerShell console\n- Receive an output object when patching is complete for all hosts with the results\n\nTo read more of a discussion about how to use this module, see my blog post [Patching Snowflakes with ConfigMgr and PowerShell](https:///adamcook.io/p/patching-snowflakes-with-configmgr-and-powershell/).\n\n## Functions\n\n- [Invoke-CMSnowflakePatching](docs/Invoke-CMSnowflakePatching.md)\n- [Invoke-CMSoftwareUpdateInstall](docs/Invoke-CMSoftwareUpdateInstall.md)\n- [Get-CMSoftwareUpdates](docs/Get-CMSoftwareUpdates.md)\n- [Start-CMClientAction](docs/Start-CMClientAction.md)\n\n`Invoke-CMSnowflakePatching` is the primary function of interest in this module. The others are actually helper functions for it, however I decided to make them public functions as they might be useful for you for other needs.\n\n## Requirements\n\nIn order to use PSCMSnowflakePatching, here are the requirements:\n\n- For each host you wish to target for remotely invoking the install of software updates, they must be reachable using [PowerShell Remoting](https://learn.microsoft.com/en-us/powershell/scripting/learn/remoting/running-remote-commands?view=powershell-7.2). Here is the Microsoft doc for PowerShell Remote requirements: (about_Remote_Requirements](https://learn.microsoft.com/en-us/powershell/module/microsoft.powershell.core/about/about_remote_requirements) \n- Microsoft Endpoint Configuration Manager PowerShell module must be installed\n- You, or the service running the code, must have access to Configuration Manager itself in order to retrieve device collections and its members.\n- You, or the service running the code, must have permissions on the remote hosts to:\n  - Reboot\n  - Query WMI classes and invoke methods in the `root\\CCM` namespace\n    - A quick and dirty way to test, import the module and run the below safe commands and if no errors are thrown, you're probably OK:\n\n```powershell\nStart-CMClientAction -ComputerName 'hostname' -ScheduleId 'MachinePolicyEvaluation'\nGet-CMSoftwareUpdates -ComputerName 'hostname'\n```\n\n## Getting started\n\nInstall and import:\n\n```powershell\nInstall-Module PSCMSnowflakePatching\nImport-Module PSCMSnowflakePatching\n```\n\nMake one or more update available to a target system by deploying it from Microsoft Endpoint Configuration Manager.\n\nFor example, I deployed a handful to my test collection and executed the below:\n\n```powershell\n$result = Invoke-CMSnowflakePatching -CollectionId 'P0100016'\n```\n\n`Write-Host` is used to produce realtime feedback about the process:\n\n![](https://github.com/codaamok/codaamok.github.io-hugo/raw/master/content/post/Patching-Snowflakes-with-ConfigMgr-and-PowerShell/images/1-1.png)\n\nWithin the `$result` variable is the output object, which could be handy for your other automation needs:\n\n![](https://github.com/codaamok/codaamok.github.io-hugo/raw/master/content/post/Patching-Snowflakes-with-ConfigMgr-and-PowerShell/images/1-2.png)\n\nBy default it doesn't reboot or make any retry attempts, but there parameters for this if you need it:\n\n- `-AllowReboot` switch will reboot the system(s) if any update returned an exit code indicating a reboot is required\n- `-Attempts` parameter will let you indicate the maximum number of retries you would like the function to install updates if there was a failure in the previous attempt\n\n## To do\n\n- Pass alternate credentials for connecting to remote hosts\n- Consider using PendingReboot or Test-PendingReboot from the gallery to make the `IsPendingReboot` reflect more than just the newly installed updates exit code","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcodaamok%2Fpscmsnowflakepatching","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fcodaamok%2Fpscmsnowflakepatching","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcodaamok%2Fpscmsnowflakepatching/lists"}