A friend of mine has written an awesome SCCM health check script that provides a snapshot of the SCCM environment health state.
Check out the script here – http://blog.tyang.org/2011/03/30/powershell-script-sccm-health-check/.
Designing & deploying IT infrastructure in the enterprise
21
Apr
A friend of mine has written an awesome SCCM health check script that provides a snapshot of the SCCM environment health state.
Check out the script here – http://blog.tyang.org/2011/03/30/powershell-script-sccm-health-check/.
Tags: check, configmgr, health, SCCM, script
18
Jan
There are almost 550 PowerShell cmdlets to manage Lync 2010. I found it difficult to find the entire list of them and finally found that these 2 URLs were the most useful:
http://technet.microsoft.com/en-us/library/gg398306.aspx
http://blogs.technet.com/b/csps/archive/2010/07/16/refallcmdlets.aspx
Tags: cmdlets, get, lync, powershell
30
Dec
I’ve created a simple Powershell script to run daily to backup Lync configuration with the export-csconfiguration command:
cd $env:UserProfile
Import-Module 'C:\Program Files\Common Files\Microsoft Lync Server 2010\Modules\Lync\Lync.psd1'
$filename = "d:\backup\{0:yyyy.MM.dd-HH.mm}-config.zip" -f (Get-Date)
export-csconfiguration -Filename $filename -Force:$True
For example, put the above code into a document called d:\backup\backup.ps1 and then create a scheduled task to execute the command on a daily basis:
powershell -command d:\Backup\backup.ps1
This can run in the SYSTEM context. Simples!
Tags: backup, config, export, export-csconfiguration, lync, powershell, restore, Scheduled Task
15
Dec
In OCS it was really simple to see how many OCS clients / users were connected to the pool and the version numbers of each client as well as the total number of enabled users.
To get the number of clients connected in Lync 2010, you need to do it via performance counters on the SQL server. Look at the SQLServer:User Settable performance counters for the backend SQL instance and add ‘user counter 1′ – this has the number of currently connected users.
To find the total number of Lync enabled users, use the “Get-CsUser -Filter {Enabled -eq $true} | Measure” Powershell cmdlet.
This seems to be another one of those things that was so easy in OCS but seems so much more difficult in Lync.
Tags: clients connected, enabled, lync, Lync 2010, OCS, SQLServer, users connected
10
Dec
I much prefer the old OCS way of enabling users for OCS / Lync, I believe it was much easier, but it looks like we are going to have to get used to using Powershell to do this. An example I have put together to enabling all users in an Organisational Unit for Lync 2010 is:
get-csADuser -OU "OU=Users,OU=Head Office,dc=danovich,dc=com,dc=au" | Enable-CsUser -RegistrarPool pool01.danovich.com.au -SipAddressType emailaddress
More reading here:
Tags: enable users, enable-csuser, get-csaduser, lync, OCS, organizational unit, OU, powershell
12
Mar
I wanted an easy way to know if OS deployments were failing or succeeding. We’ve come up with a good way of sending an email outlining task sequence completion status.
TS_Email_Notification.PS1 should contain the following:
param([string]$strComputerName)
$erroractionpreference = "SilentlyContinue"
$strSMTP = "mail.domain.com"
$strSubject = "SCCM OSD Deployment Completed for $strComputerName"
$strBody = "$strComputerName has Completed the Task Sequence"
$MailMessage = New-Object System.Net.Mail.MailMessage
$MailMessage.IsBodyHtml = $true
$SMTPClient = New-Object System.Net.Mail.smtpClient
$SMTPClient.host = $strSMTP
$Sender = New-Object System.Net.Mail.MailAddress("sender@domain.com", "Sender")
$Recipient = New-Object System.Net.Mail.MailAddress("recipient@domain.com", "Recipient")
$MailMessage.Sender = $Sender
$MailMessage.From = $Sender
$MailMessage.Subject = $strSubject
$MailMessage.To.add($Recipient)
$MailMessage.Body = $strBody
$SMTPClient.Send($MailMessage)
You just need to adjust the above Powershell script for your mail settings and you will now receive an email each time there is a successful or failed OS deployment.
Tags: 11170, 11171, email, powershell, report, SCCM, SCCM task sequence, Send SCCM task sequence, Send SCCM task sequence email report, Task Sequence Manager
Do not speak unless it improves on silence..
— Buddha