Jump to content


Search the Community

Showing results for tags 'Poweshell'.

  • Search By Tags

    Type tags separated by commas.
  • Search By Author

Content Type


Forums

  • Cloud
    • Azure
    • Microsoft Intune
    • Office 365
    • Windows 365
  • General Stuff
    • General Chat
    • Events
    • Site News
    • Official Forum Supporters
    • Windows News
    • Suggestion box
    • Jobs
  • MDT, SMS, SCCM, Current Branch &Technical Preview
    • How do I ?
    • Microsoft Deployment Toolkit (MDT)
    • SMS 2003
    • Configuration Manager 2007
    • Configuration Manager 2012
    • System Center Configuration Manager (Current Branch)
    • Packaging
    • scripting
    • Endpoint Protection
  • Windows Client
    • how do I ?
    • Windows 10
    • Windows 8
    • Windows 7
    • Windows Vista
    • Windows XP
    • windows screenshots
  • Windows Server
    • Windows Server General
    • Active Directory
    • Microsoft SQL Server
    • System Center Operations Manager
    • KMS
    • Windows Deployment Services
    • NAP
    • Failover Clustering
    • PKI
    • Hyper V
    • Exchange
    • IIS/apache/web server
    • System Center Data Protection Manager
    • System Center Service Manager
    • System Center App Controller
    • System Center Virtual Machine Manager
    • System Center Orchestrator
    • Lync
    • Application Virtualization
    • Sharepoint
    • WSUS

Find results in...

Find results that contain...


Date Created

  • Start

    End


Last Updated

  • Start

    End


Filter by number of...

Joined

  • Start

    End


Group


Website URL


Location


Interests

Found 1 result

  1. Hi all I have a unique situation, here is what i would like to do, unfortunatley not too skilled with PS. Every time a message ID 10800 is generated (10800 Informational Advanced Client The SMS Advanced client was installed. The current version is %1.) i would like to check for the left 3 characters of the computer and based on that add it to a specific collection. the collection is a direct membership with OSDAllowed = False, so no one can deploy to that system by mistake. Any help on how to do this greatly appreciated. Update: I actually had to use 10804, which is when the client is assigned. I am sure there is a way for a nicer and cleaner code :-( <> <# Add every new XP client computer to the relevant Site-NoOSD collection based on its name and filter rule, Genrating message ID 10800, and than 10804, site assigned. #> # Import the SCCM server moudle when testing outside SCCM Server #import-module 'C:\Program Files (x86)\Microsoft Configuration Manager\AdminConsole\bin\ConfigurationManager.psd1' Set-Location HQ1: # SCCM Server # $CMServerName = "HQCM01" # Get the new device name from the Filter message $DeviceName = $args[0] # Collections to use $HQCollectionName = "HQ NO OSD" $NYCollectionName = "NY NO OSD" $LACollectionName = "LA NO OSD" # Get the left three characters of the computer name $a= hostname $a=$a.Substring(0,3) # Add to the NoOSD site-Collection If ($a -eq "HQ-") {Add-CMDeviceCollectionDirectMembershipRule -CollectionName "$HQCollectionName" -ResourceID $(get-cmdevice -name "$DeviceName").ResourceID} elseif ($a -eq "LA-") {Add-CMDeviceCollectionDirectMembershipRule -CollectionName "$LACollectionName" -ResourceID $(get-cmdevice -name "$DeviceName").ResourceID} elseif ($a -eq "NY-"){Add-CMDeviceCollectionDirectMembershipRule -CollectionName "$NYCollectionName" -ResourceID $(get-cmdevice -name "$DeviceName").ResourceID} else {write-host "Not a known site client"} <> In the filter, script.ps1 %msgsys
×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.