Quantcast
Channel: ariprotheroe
Viewing all articles
Browse latest Browse all 78

Dump #Lync configuration to text files

$
0
0

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.



Viewing all articles
Browse latest Browse all 78

Trending Articles