Home > Developement, MS: Deployment (SMS,SCCM,APP-V,MDOP,WAIK,MDT,..), MS: SCCM, ConfigMgr > SCCM: Powershell scripting / WMI / SCCM Client Center

SCCM: Powershell scripting / WMI / SCCM Client Center


SCCM Module for PowerShell: http://www.snowland.se/sccm-posh/

SCCM Client Center Automation Library: http://sccmclictrlib.codeplex.com/

SCCM Client Center 2.0.4 released: http://sourceforge.net/projects/smsclictr/

http://myitforum.com/cs2/blogs/rzander/archive/2011/06/03/sccm-client-center-2-0-4-released.aspx

SMS_UpdateComplianceStatus Server WMI Class: LastEnforcementMessageID

http://msdn.microsoft.com/en-us/library/cc144844.aspx

LastEnforcementMessageID:

http://myitforum.com/cs2/blogs/idany/archive/2008/12/04/collections-based-on-software-updates-deployment-status-in-configuration-manager.aspx

Working with SCCM:

Install-SCCMUpdates.ps1

Check-SCCMUpdates.ps1

Software Updates Client COM Automation Classes:

http://msdn.microsoft.com/en-us/library/cc146318.aspx

 

PowerShell & SCCM – Getting Started with WMI:

http://www.powershell.nu/2010/10/07/powershell-sccm-getting-started-with-wmi/

PowerShell script to create a SCCM Package,Program and Queries:

http://www.jbmurphy.com/2012/05/10/powershell-script-to-create-a-sccm-packageprogram-and-queries/

PowerShell & SCCM – Collections:

http://www.powershell.nu/2010/10/07/powershell-sccm-collections/

PowerShell & SCCM – Packages:

http://www.powershell.nu/2010/10/07/powershell-sccm-packages/

PowerShell & SCCM – Program:

http://www.powershell.nu/2010/10/07/powershell-sccm-program/

PowerShell & SCCM – Distribution Point:

http://www.powershell.nu/2010/10/07/powershell-sccm-distribution-point/

PowerShell & SCCM – Advertisement:

http://www.powershell.nu/2010/10/07/powershell-sccm-advertisement/

PowerShell & SCCM – Client:

http://www.powershell.nu/2010/10/07/powershell-sccm-client/

WMI Namespaces for SCCM :

http://elmunjo.blogspot.com/2009/03/wmi-namespaces-fur-sccm.html

ConfigMgr (SCCM) EXE files and RUN Commands:

http://anoopmannur.wordpress.com/2011/04/28/configmgr-sccm-exe-files-and-run-commands/

How to Refresh the Compliance State:

http://msdn.microsoft.com/en-us/library/cc146437.aspx

Detect Computer Reboot Pending with DCM: "PendingFileRenameOperations"

http://myitforum.com/cs2/blogs/sthompson/archive/2009/03/30/detect-computer-reboot-pending-with-dcm.aspx

Software Update – Pending Reboot Notification Based on OS Language (Updated Script):

http://anotherblabla.wordpress.com/2011/12/29/software-update-reboot-notification/

 

A way to show a simple user notification message from a Task-Sequence or a Software Package is to use the following command (as one line):

powershell.exe -command $a = New-Object -comobject SMSCliUI.UIEvents; $a.ShowMessage(‘User Notification’, ‘Please restart your computer…’, 1)

The message will be visible even if the package runs with System privileges and the flag “Allow users to interact with this program” is not enabled.

 

Poweshell script to find out computers pending reboot

$computers = Get-Content "C:\computers.txt"
foreach ($computer in $computers)
{
Try{
$HKLM = [Microsoft.Win32.RegistryKey]::OpenRemoteBaseKey("LocalMachine", $computer)
$string = $HKLM.OpenSubKey("SYSTEM\CurrentControlSet\Control\Session Manager").getvalue("PendingFileRenameOperations")}
Catch{}
if($string){
Write-Host "Pending reboot for computer" $computer

  1. No comments yet.
  1. No trackbacks yet.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google photo

You are commenting using your Google account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s

%d bloggers like this: