Dump #Lync configuration to text files

When documenting a Lync deployment my backup script and its dump configuration function has been invaluable as I can easily convert the output by copy and pasting into Microsoft Word and then select the content use the Insert Table -> Convert Text to Table and select the Separate text at Other and enter a colon :

Then with minimal effort, I can document the key policies and configuration.

As part of version 5.00 (coming soon) of my Backup-CsServer.ps1 script and I been reviewing all the code (almost 1000 lines of it!) and optimising where needed and adding support for Lync Server 2013, bug fixing plus adding new features.

Here is a nice PowerShell one-liner which will dump all the output of the Get-Cs cmdlets to text files.  It works with both Lync Server 2010 and 2013.

Just open the Lync Server Management Shell create a new empty directory and change directory into it and run the cmdlet

foreach($i in Get-Command Get-Cs*) { if($i.CommandType -eq “Cmdlet”){if (($i.name -eq “Get-CsAdminRoleAssignment”) -or ($i.name -eq “Get-CsClientCertificate”) -or ($i.name -eq “Get-CsClientPinInfo”) -or ($i.name -eq “Get-CsRgsConfiguration”) -or ($i.name -eq “Get-CsUserPoolInfo”) -or ($i.name -eq “Get-CsBackupServiceStatus”) -or ($i.name -eq “Get-CsClientAccessLicense”) -or ($i.name -eq “Get-CsDatabaseMirrorState”) -or ($i.name -eq “Get-CsEffectivePolicy”) -or ($i.name -eq “Get-CsPersistentChatEligiblePrincipal”) -or ($i.name -eq “Get-CsPoolBackupRelationship”) -or ($i.name -eq “Get-CsPoolFabricState”) -or ($i.name -eq “Get-CsTestUserCredential”) -or ($i.name -eq “Get-CsWebTicket”)){} Else {. $i.Name | out-file $i”.txt”}}}

My new backup script will add support CSV and XML outputs with the dump configuration function which gets over having to use the ExpandProperty parameter.

Advertisements

4 thoughts on “Dump #Lync configuration to text files

  1. Pingback: Dump #Lync configuration to text files | ariprotheroe « JC’s Blog-O-Gibberish

  2. Pingback: Dump Exchange Server 2013 configuration to text files | ariprotheroe

  3. Pingback: ariprotheroe: Dump Exchange Server 2013 configuration to text files « Lync News

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s