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

#Lync Question 32: How do I dump Lync configuration to text files

$
0
0

Reblog of an old post of mine

When documenting a Lync deployment this PowerShell 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.

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"}}}


Viewing all articles
Browse latest Browse all 78

Trending Articles