Howto Force remote clients to update their Sccm clients Machine Policy Retrieval & Evaluation Cycle via Powershell

Hello!

Here is some script to force a Sccm Client’s Machine Policy Cycle on remote client in a domain.

But first. You need to be sure you have enable the service “Windows Remote Managment” on that client in the domain.
And be sure you run the script in correct logon context.

Link: http://msdn.microsoft.com/en-us/library/aa384372(v=vs.85).aspx

Script:

$ComputerName = Read-host("Enter The computername")</code>

<code>Invoke-Command -ComputerName $ComputerName -ScriptBlock {
Invoke-WmiMethod -Namespace "Root\CCM" -Class SMS_Client -Name TriggerSchedule -ArgumentList "{00000000-0000-0000-0000-000000000021}"
}

Lämna ett svar

E-postadressen publiceras inte. Obligatoriska fält är märkta *

Slipp Obamatrafiken med fem jobba hemma-tips

Svårt att ta sig till jobbet? –  Jobba hemma! Med anledning av president Obamas Sverigebesök förväntas stora störningar i trafiken. Vi hoppas att alla som kan och har möjlighet att

Powershell GUI SCCM Client Tools

SCCM Client Tools (right now it´s Beta) is Microsoft Powershell tool, the GUI is created with SAPIEN Powershell Studio. Import Computers from SCCM collection and initiate client tasks. Requirements: 1)

Powershell – Howto remove files and folder that is older than X days

Hello script geeks! Today I want to talk about how you can easiest remove files and folder that is older than X days. You can get use of cmdlet Get-ChildItem to List all files