myITforum and Windows IT Pro Forums

 Scripting SCCM Distribution Point Setting

Author Message
Joe909

  • Total Posts : 24
  • Scores: 0
  • Reward points : 4060
  • Joined: 8/11/2008
  • Status: offline
Scripting SCCM Distribution Point Setting Thursday, March 10, 2011 5:59 PM (permalink)
0
I've been working on scripting things in SCCM with VBScript, and I was wondering if any of you know how to programatically check the box on a package's Distribution tab that says "Allow this package to be transferred via multicast (WinPE only)"? Everything else is working just fine - I just can't figure out how to check that one little box. And I should mention that I did some digging in the SCCM 2007 SDK help files and didn't turn up anything there. Anyone able to help? Thanks!
 
#1
    fault

    • Total Posts : 272
    • Scores: 17
    • Reward points : 27520
    • Joined: 7/21/2008
    • Location: Sydney, Australia
    • Status: offline
    Re:Scripting SCCM Distribution Point Setting Friday, March 11, 2011 8:05 AM (permalink)
    0
    It's undocumented... ;) I'm guessing you've had a look at the SMS_PackageBaseclass WMI class? You'll notice there's nothing under PkgFlags for 0x08000000 (27)...

    I'm moving onto PowerShell these days and away from VBScript, so here's an example which I'm sure you can slice and dice back into VBScript if you really want :)

    # Get packages
     $MyPackages = Get-WmiObject -ComputerName "SVR1" -Namespace "root\sms\site_SYD" -Query "select * from SMS_Package" 
    
    # Enumerate packages
    foreach ($Package in $MyPackages) {
    	# Debug message
    	Write-Host $Package.PackageID $Package.Manufacturer $Package.Name $Package.Version $Package.PkgFlags
    	
    	# Set "Allow this package to be transferred via multicast" if not set
    	If (($Package.PkgFlags -band [math]::pow(2,27)) -eq 0) {
    		$Package.PkgFlags = $Package.PkgFlags + [math]::pow(2,27)
    		$Package.Put()
    	}
    }
     
    #2
      Online Bookmarks Sharing: Share/Bookmark

      Jump to:

      Current active users

      There are 0 members and 1 guests.

      Icon Legend and Permission

      • New Messages
      • No New Messages
      • Hot Topic w/ New Messages
      • Hot Topic w/o New Messages
      • Locked w/ New Messages
      • Locked w/o New Messages
      • Read Message
      • Post New Thread
      • Reply to message
      • Post New Poll
      • Submit Vote
      • Post reward post
      • Delete my own posts
      • Delete my own threads
      • Rate post

      2000-2017 ASPPlayground.NET Forum Version 3.9