This blog is owned and operated by the ANZ ConfigMgr Premier Field Engineer team.
Contributors
Ian BartlettMatt ShadboltGeorge Smpyrakis
Blog Links
I’ve recently spent some time with a customer deploying a large amount of Distribution Points in their ConfigMgr 2012 R2 hierarchy. They were finding themselves running into bottlenecks during the deployment, and with the help of the ConfigMgr Product Group, a new Site Control File property modification is now being supported.
The DPUpgradeThreadLimit property by default is set to five. The property should be carefully increased in environments where many Distribution Points are being installed/upgraded in parallel.
As the property is not visible by default, we need to create and set the new property. This will add the property and set it to the $newValue value across all of your Sites.
This script is provided as-is and provides no warranties. Please thoroughly test in a lab environment, and see the Configuration Manager SDK for more information.
When I have a little downtime (which isn’t often!), I like to sit around and think of cool things I can automate using PowerShell. I have a .txt file that I put all these ideas into and every now and then have a crack at solving one.
Just recently I was playing around with Office 365 and Windows InTune and this idea struck me.
With the licensing model of Office 365 being user based, people are syncing their mail to more and more devices. They’ll have Outlook on their work laptop, email syncing on their Windows Phone, and probably syncing on their Apple and/or Android tablet as well. The problem with having so many devices is IT tracking and managing their corporate data. Of course, InTune is the obvious tool to manage these devices.
Getting your users to enrol their devices into InTune is one of the main challenges. As the registration has to happen from the end users side, I thought I’d write a script to help pester your users into registering their iPads, iPhones, Androids and WPs into your InTune MDM.
The idea is for this script to be run as a scheduled task. It will connect to your o365 tenant subscription and discover all those users who have synced their device with o365 since the last scheduled task ran. It will then send that user an email reminding them to enrol their device to InTune.
The email to your users can obviously be customized, but here’s a look at what I’ve given you by default
I’ve also added a testing mode switch, so you don’t spam your o365 users while doing your dev and test.
Here’s the script.
Matt Shadbolt
Hi All,
I had a need at a customer to write a script that would identify any active package distributions at a primary site via WMI. Although DPJobMgr will also give you more information and control this script returns a quicker result and in the case I was dealing with when you have a large number of active package distributions this can come in handy. Hopefully you'll find it useful.
The script is based on the SMS_DistributionJob Server WMI Class
(UPDATE. Matt just provided me with the following code that will give you your Primary site code automatically from WMI. thanks Matty.
##################################################
$providerLocation = gcim -ComputerName $siteServerName -Namespace root\sms SMS_ProviderLocation -filter "ProviderForLocalSite='True'"
$sitecode = $providerLocation.SiteCode
$providerNamespace = "root\sms\site_" + $sitecode
###################################################
Updated script below
)
####################################################################################################################################
##Check the content distribution queue on a primary
$providerLocation = gcim -ComputerName $siteServerName -Namespace root\sms SMS_ProviderLocation -filter "ProviderForLocalSite='True'"$sitecode = $providerLocation.SiteCode$providerNamespace = "root\sms\site_" + $sitecode
$count = (Get-WmiObject -Namespace $providerNamespace -Class SMS_DistributionJob).count
$Activethreadcount = (Get-WmiObject -Namespace "root\SMS\Site_$($SiteCode)" -Class SMS_DistributionJob | Where {$_.Starttime -ne $null}).Count
$Activethreads = Get-WmiObject -Namespace "root\SMS\Site_$($SiteCode)" -Class SMS_DistributionJob | Where {$_.Starttime -ne $null} | Format-List -Property Starttime, RemainingSize
Write-Output "Total Current Active Distributions $($count)"
Write-Output "Total Active Threads Count $($Activethreadcount)"
Write-Output "Current Threads" $Activethreads
Feel free to post any updates or even scripts that you've written in the comments below.
If you want to look at other classes that could provide you with more information just check out the following MSDN reference
http://msdn.microsoft.com/en-us/library/hh948405.aspx