Scripts

Here is a list of all of my scripts I’ve posted about on this blog. I’ll try to keep this page current.

Lync Server scripts

Get-CsFederatedConversationDetails.ps1 v1.0 (05-13-2014)
See time & date info about conversations with specific federated domains.

Get-CsUpdateVersion.ps1 v1.3 (09-02-2014)
See installed Cumulative Update version for all Lync Servers.

Get-CsDatabaseUpdateStatus.ps1 v1.1 (04-30-2014)
Shows database version info, and indicates if database updates are needed as a result of installation of a Cumulative Update.

New-CsLyncRoomSystem.ps1 v1.2 (06-10-2014)
Easily deploy this exciting feature in Lync Server 2013. Creates & configures mailbox, meeting room, etc.

New-CsClonedPolicy.ps1 v1.2 (06-10-2014)
Clones an existing Lync Server 2013 policy to a new policy.

Set-Cs2013Features.ps1 v2.8 (08-13-2014)
Install the prerequisites and many additional features, configurations, and add-ons for Lync Server 2013.

Set-Lync2010Features.ps1 v5.3 (12-23-2011)
Install the prerequisites and many additional features, configurations, and add-ons for Lync Server 2010.

Get-CsConnections.ps1 v2.8 (06-10-2014)
Lists connections per Lync Server 2010 and 2013 Front End server in a pool, load balancing distribution, and per user connections.

Get-CsVoiceCalls.ps1 v1.4 (06-12-2012)
View basic information about current voice calls in Lync Server 2010.

New-CsFirmware.ps1 v1.7 (05-20-2014)
Import single or multiple Lync Phone Edition firmware updates to single or multiple pools. Includes support for Polycom VVX and Snom firmware, too.

Grant-CsPolicyByADGroup.ps1 v1.5 (02-08-2014)
Assign Lync policies to users based on Active Directory group membership

Lync Server one liners

  1. One Liner: Finding out which Lync pool servers a user is associated with, and the preferred connection order
  2. One Liner: Finding AD disabled accounts who are still Lync enabled
  3. One Liner: Setting recovery option to ‘restart’ for Lync services
  4. One Liner: Find Users Whose SMTP Address Doesn’t Match Their SIP Address

Exchange Server scripts, functions, and modules

ExchangeServices v1.0 (04-01-2014)
Module with three functions to stop/start/query Exchange services

Set-Exchange2010Features.ps1 v3.3 (12-29-2011)
Install the prerequisites for Exchange 2010 on Windows 2008 R2.

Set-Exchange2010FilterConfig.ps1 v2.0
Configure the Filter Pack for Exchange 2010

Set-Exchange2010RedirectSSL.ps1 v1.5 (04-29-2014)
Configure SSL settings and folder redirection for Exchange 2010

Add-BadWordsFromFile.ps1 v1.0 (10-08-2009)
Import a list of bad words from a file for the Exchange 2010 content filter.

Hide-InternetNewsgroups.ps1
Hide the Internet Newsgroups folder from appearing in the Public Folder list of Exchange Server.

Add-Cmdlets2Dictionary.ps1
Add Exchange 2007 and/or 2010 cmdlets to the Microsoft Word dictionary

DAG-InstallRollup.ps1
Script for installing update rollups on DAG servers

New-WelcomeEmail.ps1 v1.3 (02-24-2013)
Automatically sends an informative, HTML formatted email to a user once their mailbox is created.

AutoApplyMRMPolicy.ps1
Automatically apply an MRM policy to mailboxes upon creation

Update-MobileNumber.ps1
Update the Global Address Book when a user adds a new ActiveSync device

New-DirectoryUpdateReminder.ps1 v1.7 (01-27-2014)
Remind users to update their Active Directory information

New-ADPasswordReminder.ps1 v2.9 (09-13-2013)
Sends an informative, HTML formatted email to users whose password is soon expiring. This is useful for those users who are mobile only and don’t get the conventional notices.

Function: New-LocalExchangeConnection
Establishes a connection to Exchange 2010 on the local server

Exchange Server one liners

  1. One Liner: Finding users with forwarding addresses set
  2. One Liner: See failed inbound messages for the past few days
  3. One Liner: Restarting stopped services
  4. One Liner: Finding users who have Send-As or Full Access permissions to mailboxes
  5. One Liner: Setting the default language and time zone for OWA
  6. One Liner: Exporting distribution list membership to Excel
  7. One Liner: Get All Exchange Users Who Are Configured For Forwarding
  8. One Liner: List All Users Who Have Send-As Access To Other Mailboxes

Misc scripts

Function: Set-PowerPlan v1.0 (02-25-2014)
Set the power plan of a server for better performance.

Function: Set-AdminUser v1.0 (10-22-2012)
Clear AdminCount and set security inheritance on a specified user account

Function: New-PSUpdateHelp v1.1 (02-07-2014)
Automatically create a scheduled task to update PowerShell v3 help files

Function: Set-Timezone v1.0 (03-04-2013)
Easily define the desired timezone when building servers

Function: New-SignedScript v1.1 (06-10-2014)
Sign one or many PowerShell scripts with your code signing certificate

New-ExpiringCertificatesReminder.ps1 v1.2 (01-27-2014)
Receive a Reminder When Certificates Have Expired/Are Expiring

Function: New-FirewallRule v1.0 (09-14-2012)
Create Windows Firewall rules with PowerShell

Set-WindowsEmailAddress.ps1 v1.2 (01-27-2014)
Update the WindowsEmailAddress field of users in environments WITHOUT Exchange server.

Function: New-LoopbackAdapter.ps1 v1.0
Create and configure a loopback adapter for use with Direct Server Return hardware load balancing.

New-HandBrakeConversion.ps1 v1.3 (10-04-2011)
Process entire folders of video files through HandBrake to convert them to iTunes format.

Function: Remove-NicGateway v1.0 (03-13-2012)
Removes the default gateway on selected network interfaces

Function: Set-DriveLabel v1.0 (03-06-2012)
Set the label of a selected drive

Function: New-BalloonTip v1.1 (01-31-2014)
Show a Windows system tray balloon tip

Functions: Get-UACStatus and Set-UACStatus v1.0 (02-20-2012)
Functions for displaying and settings Windows User Access Control

Function: Set-ModuleStatus v1.2 (02-07-2014)
Load PowerShell modules with error checking

Function: New-Password v1.0 12-26-2011
Quickly and easily generate passwords, complete with phonetic pronunciation

Functions: Get-LocalAdminGroupMembership and Set-LocalAdminGroupMembership v1.0 (12-22-2011)
Get and set local admin group membership on remote computers.

Function: New-Pause v1.0 (12-21-2011)
A graceful way to pause your PowerShell scripts

Function: New-Sleep v1.0 (12-20-2011)
A more graphical way to introduce delay in PowerShell scripts

Function: New-Share v1.0 (07-13-2011)
Programatically create file shares

Function: Remove-ScriptVariables v1.0 (07-08-2011)
Remove all variables from a script from memory

Function: New-PSUpdateHelpScheduledTask v1.1 (02-07-2014)
Creates scheduled task that automatically updates PowerShell help files everyday.

Misc One Liners

One-Liner: Getting the Top 5 Errors In an Event Log

  1. Huseyin Unal
    March 4, 2012 at 3:43 pm | #1

    Hi Pat, I’ d like to say thank you so much indeed for your amazing scripts. There’s no doubt that exchange server administrators deeply grateful to you! Cheers

  2. U. P. B. Michael
    May 7, 2012 at 6:10 am | #2

    Many thanks for your script which make things easier and saves time as well.
    Thanks again, great work.

  1. No trackbacks yet.

Leave a Reply