Microsoft.KnowledgeServices.Lync.2010.ClientPolicy_Discovery

Microsoft.KnowledgeServices.Lync.2010.ClientPolicy_Discovery (Discovery)

Discovery module for class Microsoft.KnowledgeServices.Lync.2010.ClientPolicy

Element properties:

TargetMicrosoft.KnowledgeServices.Lync.2010.CsServer
EnabledTrue
Frequency14400
RemotableFalse

Object Discovery Details:

Discovered Classes and their attribuets:
  • Microsoft.KnowledgeServices.Lync.2010.ClientPolicy
    • Identity
    • description
    • AddressBookAvailability
    • AttendantSafeTransfer
    • AutoDiscoveryRetryInterval
    • BlockConversationFromFederatedContacts
    • CalendarStatePublicationInterval
    • ConferenceIMIdleTimeout
    • CustomizedHelpUrl
    • CustomLinkInErrorMessages
    • CustomStateUrl
    • DGRefreshInterval
    • DisableCalendarPresence
    • DisableContactCardOrganizationTab
    • DisableEmailComparisonCheck
    • DisableEmoticons
    • DisableFederatedPromptDisplayName
    • DisableFeedsTab
    • DisableFreeBusyInfo
    • DisableHandsetOnLockedMachine
    • DisableHtmlIm
    • DisableICE
    • DisableInkIM
    • DisableMeetingSubjectAndLocation
    • DisableOneNote12Integration
    • DisableOnlineContextualSearch
    • DisablePhonePresence
    • DisablePICPromptDisplayName
    • DisablePoorDeviceWarnings
    • DisablePoorNetworkWarnings
    • DisablePresenceNote
    • DisableRTFIM
    • DisableSavingIM
    • DisplayPhoto
    • EnableAppearOffline
    • EnableCallLogAutoArchiving
    • EnableClientMusicOnHold
    • EnableConversationWindowTabs
    • EnableEnterpriseCustomizedHelp
    • EnableEventLogging
    • EnableExchangeContactSync
    • EnableExchangeDelegateSync
    • EnableFullScreenVideo
    • EnableHotdesking
    • EnableIMAutoArchiving
    • EnableNotificationForNewSubscribers
    • EnableSQMData
    • EnableTracing
    • EnableUnencryptedFileTransfer
    • EnableUrl
    • EnableVOIPCallDefault
    • ExcludedContactFolders
    • HotdeskingTimeout
    • IMWarning
    • MAPIPollInterval
    • MaximumDGsAllowedInContactList
    • MaximumNumberOfContacts
    • MaxPhotoSizeKb
    • MusicOnHoldAudioFile
    • P2PAppSharingEncryption
    • PlayAbbreviatedDialTone
    • SearchPrefixFlags
    • ShowManagePrivacyRelationships
    • ShowRecentContacts
    • ShowSharepointPhotoEditLink
    • SPSearchCenterExternalURL
    • SPSearchCenterInternalURL
    • SPSearchExternalURL
    • SPSearchInternalURL
    • tabURL
    • WebServicePollInterval

Member Modules:

ID Module Type TypeId RunAs 
Microsoft.KnowledgeServices.Lync.2010.ClientPolicy_Discovery DataSource Microsoft.Windows.TimedPowerShell.DiscoveryProvider Microsoft.KnowledgeServices.ElevatedAccount

Source Code:

<Discovery ID="Microsoft.KnowledgeServices.Lync.2010.ClientPolicy_Discovery" Enabled="true" Target="MicrosoftKnowledgeServicesLyncLibrary!Microsoft.KnowledgeServices.Lync.2010.CsServer" ConfirmDelivery="true" Remotable="true" Priority="Normal">
<Category>Discovery</Category>
<DiscoveryTypes>
<DiscoveryClass TypeID="MicrosoftKnowledgeServicesLyncLibrary!Microsoft.KnowledgeServices.Lync.2010.ClientPolicy">
<Property TypeID="MicrosoftKnowledgeServicesLyncLibrary!Microsoft.KnowledgeServices.Lync.2010.ClientPolicy" PropertyID="Identity"/>
<Property TypeID="MicrosoftKnowledgeServicesLyncLibrary!Microsoft.KnowledgeServices.Lync.2010.ClientPolicy" PropertyID="description"/>
<Property TypeID="MicrosoftKnowledgeServicesLyncLibrary!Microsoft.KnowledgeServices.Lync.2010.ClientPolicy" PropertyID="AddressBookAvailability"/>
<Property TypeID="MicrosoftKnowledgeServicesLyncLibrary!Microsoft.KnowledgeServices.Lync.2010.ClientPolicy" PropertyID="AttendantSafeTransfer"/>
<Property TypeID="MicrosoftKnowledgeServicesLyncLibrary!Microsoft.KnowledgeServices.Lync.2010.ClientPolicy" PropertyID="AutoDiscoveryRetryInterval"/>
<Property TypeID="MicrosoftKnowledgeServicesLyncLibrary!Microsoft.KnowledgeServices.Lync.2010.ClientPolicy" PropertyID="BlockConversationFromFederatedContacts"/>
<Property TypeID="MicrosoftKnowledgeServicesLyncLibrary!Microsoft.KnowledgeServices.Lync.2010.ClientPolicy" PropertyID="CalendarStatePublicationInterval"/>
<Property TypeID="MicrosoftKnowledgeServicesLyncLibrary!Microsoft.KnowledgeServices.Lync.2010.ClientPolicy" PropertyID="ConferenceIMIdleTimeout"/>
<Property TypeID="MicrosoftKnowledgeServicesLyncLibrary!Microsoft.KnowledgeServices.Lync.2010.ClientPolicy" PropertyID="CustomizedHelpUrl"/>
<Property TypeID="MicrosoftKnowledgeServicesLyncLibrary!Microsoft.KnowledgeServices.Lync.2010.ClientPolicy" PropertyID="CustomLinkInErrorMessages"/>
<Property TypeID="MicrosoftKnowledgeServicesLyncLibrary!Microsoft.KnowledgeServices.Lync.2010.ClientPolicy" PropertyID="CustomStateUrl"/>
<Property TypeID="MicrosoftKnowledgeServicesLyncLibrary!Microsoft.KnowledgeServices.Lync.2010.ClientPolicy" PropertyID="DGRefreshInterval"/>
<Property TypeID="MicrosoftKnowledgeServicesLyncLibrary!Microsoft.KnowledgeServices.Lync.2010.ClientPolicy" PropertyID="DisableCalendarPresence"/>
<Property TypeID="MicrosoftKnowledgeServicesLyncLibrary!Microsoft.KnowledgeServices.Lync.2010.ClientPolicy" PropertyID="DisableContactCardOrganizationTab"/>
<Property TypeID="MicrosoftKnowledgeServicesLyncLibrary!Microsoft.KnowledgeServices.Lync.2010.ClientPolicy" PropertyID="DisableEmailComparisonCheck"/>
<Property TypeID="MicrosoftKnowledgeServicesLyncLibrary!Microsoft.KnowledgeServices.Lync.2010.ClientPolicy" PropertyID="DisableEmoticons"/>
<Property TypeID="MicrosoftKnowledgeServicesLyncLibrary!Microsoft.KnowledgeServices.Lync.2010.ClientPolicy" PropertyID="DisableFederatedPromptDisplayName"/>
<Property TypeID="MicrosoftKnowledgeServicesLyncLibrary!Microsoft.KnowledgeServices.Lync.2010.ClientPolicy" PropertyID="DisableFeedsTab"/>
<Property TypeID="MicrosoftKnowledgeServicesLyncLibrary!Microsoft.KnowledgeServices.Lync.2010.ClientPolicy" PropertyID="DisableFreeBusyInfo"/>
<Property TypeID="MicrosoftKnowledgeServicesLyncLibrary!Microsoft.KnowledgeServices.Lync.2010.ClientPolicy" PropertyID="DisableHandsetOnLockedMachine"/>
<Property TypeID="MicrosoftKnowledgeServicesLyncLibrary!Microsoft.KnowledgeServices.Lync.2010.ClientPolicy" PropertyID="DisableHtmlIm"/>
<Property TypeID="MicrosoftKnowledgeServicesLyncLibrary!Microsoft.KnowledgeServices.Lync.2010.ClientPolicy" PropertyID="DisableICE"/>
<Property TypeID="MicrosoftKnowledgeServicesLyncLibrary!Microsoft.KnowledgeServices.Lync.2010.ClientPolicy" PropertyID="DisableInkIM"/>
<Property TypeID="MicrosoftKnowledgeServicesLyncLibrary!Microsoft.KnowledgeServices.Lync.2010.ClientPolicy" PropertyID="DisableMeetingSubjectAndLocation"/>
<Property TypeID="MicrosoftKnowledgeServicesLyncLibrary!Microsoft.KnowledgeServices.Lync.2010.ClientPolicy" PropertyID="DisableOneNote12Integration"/>
<Property TypeID="MicrosoftKnowledgeServicesLyncLibrary!Microsoft.KnowledgeServices.Lync.2010.ClientPolicy" PropertyID="DisableOnlineContextualSearch"/>
<Property TypeID="MicrosoftKnowledgeServicesLyncLibrary!Microsoft.KnowledgeServices.Lync.2010.ClientPolicy" PropertyID="DisablePhonePresence"/>
<Property TypeID="MicrosoftKnowledgeServicesLyncLibrary!Microsoft.KnowledgeServices.Lync.2010.ClientPolicy" PropertyID="DisablePICPromptDisplayName"/>
<Property TypeID="MicrosoftKnowledgeServicesLyncLibrary!Microsoft.KnowledgeServices.Lync.2010.ClientPolicy" PropertyID="DisablePoorDeviceWarnings"/>
<Property TypeID="MicrosoftKnowledgeServicesLyncLibrary!Microsoft.KnowledgeServices.Lync.2010.ClientPolicy" PropertyID="DisablePoorNetworkWarnings"/>
<Property TypeID="MicrosoftKnowledgeServicesLyncLibrary!Microsoft.KnowledgeServices.Lync.2010.ClientPolicy" PropertyID="DisablePresenceNote"/>
<Property TypeID="MicrosoftKnowledgeServicesLyncLibrary!Microsoft.KnowledgeServices.Lync.2010.ClientPolicy" PropertyID="DisableRTFIM"/>
<Property TypeID="MicrosoftKnowledgeServicesLyncLibrary!Microsoft.KnowledgeServices.Lync.2010.ClientPolicy" PropertyID="DisableSavingIM"/>
<Property TypeID="MicrosoftKnowledgeServicesLyncLibrary!Microsoft.KnowledgeServices.Lync.2010.ClientPolicy" PropertyID="DisplayPhoto"/>
<Property TypeID="MicrosoftKnowledgeServicesLyncLibrary!Microsoft.KnowledgeServices.Lync.2010.ClientPolicy" PropertyID="EnableAppearOffline"/>
<Property TypeID="MicrosoftKnowledgeServicesLyncLibrary!Microsoft.KnowledgeServices.Lync.2010.ClientPolicy" PropertyID="EnableCallLogAutoArchiving"/>
<Property TypeID="MicrosoftKnowledgeServicesLyncLibrary!Microsoft.KnowledgeServices.Lync.2010.ClientPolicy" PropertyID="EnableClientMusicOnHold"/>
<Property TypeID="MicrosoftKnowledgeServicesLyncLibrary!Microsoft.KnowledgeServices.Lync.2010.ClientPolicy" PropertyID="EnableConversationWindowTabs"/>
<Property TypeID="MicrosoftKnowledgeServicesLyncLibrary!Microsoft.KnowledgeServices.Lync.2010.ClientPolicy" PropertyID="EnableEnterpriseCustomizedHelp"/>
<Property TypeID="MicrosoftKnowledgeServicesLyncLibrary!Microsoft.KnowledgeServices.Lync.2010.ClientPolicy" PropertyID="EnableEventLogging"/>
<Property TypeID="MicrosoftKnowledgeServicesLyncLibrary!Microsoft.KnowledgeServices.Lync.2010.ClientPolicy" PropertyID="EnableExchangeContactSync"/>
<Property TypeID="MicrosoftKnowledgeServicesLyncLibrary!Microsoft.KnowledgeServices.Lync.2010.ClientPolicy" PropertyID="EnableExchangeDelegateSync"/>
<Property TypeID="MicrosoftKnowledgeServicesLyncLibrary!Microsoft.KnowledgeServices.Lync.2010.ClientPolicy" PropertyID="EnableFullScreenVideo"/>
<Property TypeID="MicrosoftKnowledgeServicesLyncLibrary!Microsoft.KnowledgeServices.Lync.2010.ClientPolicy" PropertyID="EnableHotdesking"/>
<Property TypeID="MicrosoftKnowledgeServicesLyncLibrary!Microsoft.KnowledgeServices.Lync.2010.ClientPolicy" PropertyID="EnableIMAutoArchiving"/>
<Property TypeID="MicrosoftKnowledgeServicesLyncLibrary!Microsoft.KnowledgeServices.Lync.2010.ClientPolicy" PropertyID="EnableNotificationForNewSubscribers"/>
<Property TypeID="MicrosoftKnowledgeServicesLyncLibrary!Microsoft.KnowledgeServices.Lync.2010.ClientPolicy" PropertyID="EnableSQMData"/>
<Property TypeID="MicrosoftKnowledgeServicesLyncLibrary!Microsoft.KnowledgeServices.Lync.2010.ClientPolicy" PropertyID="EnableTracing"/>
<Property TypeID="MicrosoftKnowledgeServicesLyncLibrary!Microsoft.KnowledgeServices.Lync.2010.ClientPolicy" PropertyID="EnableUnencryptedFileTransfer"/>
<Property TypeID="MicrosoftKnowledgeServicesLyncLibrary!Microsoft.KnowledgeServices.Lync.2010.ClientPolicy" PropertyID="EnableUrl"/>
<Property TypeID="MicrosoftKnowledgeServicesLyncLibrary!Microsoft.KnowledgeServices.Lync.2010.ClientPolicy" PropertyID="EnableVOIPCallDefault"/>
<Property TypeID="MicrosoftKnowledgeServicesLyncLibrary!Microsoft.KnowledgeServices.Lync.2010.ClientPolicy" PropertyID="ExcludedContactFolders"/>
<Property TypeID="MicrosoftKnowledgeServicesLyncLibrary!Microsoft.KnowledgeServices.Lync.2010.ClientPolicy" PropertyID="HotdeskingTimeout"/>
<Property TypeID="MicrosoftKnowledgeServicesLyncLibrary!Microsoft.KnowledgeServices.Lync.2010.ClientPolicy" PropertyID="IMWarning"/>
<Property TypeID="MicrosoftKnowledgeServicesLyncLibrary!Microsoft.KnowledgeServices.Lync.2010.ClientPolicy" PropertyID="MAPIPollInterval"/>
<Property TypeID="MicrosoftKnowledgeServicesLyncLibrary!Microsoft.KnowledgeServices.Lync.2010.ClientPolicy" PropertyID="MaximumDGsAllowedInContactList"/>
<Property TypeID="MicrosoftKnowledgeServicesLyncLibrary!Microsoft.KnowledgeServices.Lync.2010.ClientPolicy" PropertyID="MaximumNumberOfContacts"/>
<Property TypeID="MicrosoftKnowledgeServicesLyncLibrary!Microsoft.KnowledgeServices.Lync.2010.ClientPolicy" PropertyID="MaxPhotoSizeKb"/>
<Property TypeID="MicrosoftKnowledgeServicesLyncLibrary!Microsoft.KnowledgeServices.Lync.2010.ClientPolicy" PropertyID="MusicOnHoldAudioFile"/>
<Property TypeID="MicrosoftKnowledgeServicesLyncLibrary!Microsoft.KnowledgeServices.Lync.2010.ClientPolicy" PropertyID="P2PAppSharingEncryption"/>
<Property TypeID="MicrosoftKnowledgeServicesLyncLibrary!Microsoft.KnowledgeServices.Lync.2010.ClientPolicy" PropertyID="PlayAbbreviatedDialTone"/>
<Property TypeID="MicrosoftKnowledgeServicesLyncLibrary!Microsoft.KnowledgeServices.Lync.2010.ClientPolicy" PropertyID="SearchPrefixFlags"/>
<Property TypeID="MicrosoftKnowledgeServicesLyncLibrary!Microsoft.KnowledgeServices.Lync.2010.ClientPolicy" PropertyID="ShowManagePrivacyRelationships"/>
<Property TypeID="MicrosoftKnowledgeServicesLyncLibrary!Microsoft.KnowledgeServices.Lync.2010.ClientPolicy" PropertyID="ShowRecentContacts"/>
<Property TypeID="MicrosoftKnowledgeServicesLyncLibrary!Microsoft.KnowledgeServices.Lync.2010.ClientPolicy" PropertyID="ShowSharepointPhotoEditLink"/>
<Property TypeID="MicrosoftKnowledgeServicesLyncLibrary!Microsoft.KnowledgeServices.Lync.2010.ClientPolicy" PropertyID="SPSearchCenterExternalURL"/>
<Property TypeID="MicrosoftKnowledgeServicesLyncLibrary!Microsoft.KnowledgeServices.Lync.2010.ClientPolicy" PropertyID="SPSearchCenterInternalURL"/>
<Property TypeID="MicrosoftKnowledgeServicesLyncLibrary!Microsoft.KnowledgeServices.Lync.2010.ClientPolicy" PropertyID="SPSearchExternalURL"/>
<Property TypeID="MicrosoftKnowledgeServicesLyncLibrary!Microsoft.KnowledgeServices.Lync.2010.ClientPolicy" PropertyID="SPSearchInternalURL"/>
<Property TypeID="MicrosoftKnowledgeServicesLyncLibrary!Microsoft.KnowledgeServices.Lync.2010.ClientPolicy" PropertyID="tabURL"/>
<Property TypeID="MicrosoftKnowledgeServicesLyncLibrary!Microsoft.KnowledgeServices.Lync.2010.ClientPolicy" PropertyID="WebServicePollInterval"/>
</DiscoveryClass>
</DiscoveryTypes>
<DataSource ID="Microsoft.KnowledgeServices.Lync.2010.ClientPolicy_Discovery" RunAs="KnowledgeServices!Microsoft.KnowledgeServices.ElevatedAccount" TypeID="Windows!Microsoft.Windows.TimedPowerShell.DiscoveryProvider">
<IntervalSeconds>14400</IntervalSeconds>
<SyncTime/>
<ScriptName>ClientPolicy.ps1</ScriptName>
<ScriptBody><Script>

param($SourceId,$ManagedEntityId)

$ErrorActionPreference = "Stop"


function _AdvisorGetTypedValue()
{
param([string] $type, [string] $v)
if (($type -eq "String") -or ($v -eq $null) )
{
return $v
}
if ($v.Trim().Length -gt 0)
{
switch ($type)
{
"Boolean" { if ($v -eq "true") {$true} else {$false} }
"DateTime" { [System.DateTime]::Parse($v) }
"Guid" { New-Object System.Guid($v) }
"Integer" { [int]$v }
"Float" { [float]$v }
}
}
else
{
$null
}
}
function _AdvisorAddProperty()
{
param([object]$o, [string]$p, [object]$v, [bool]$key)
if (($key -eq $true) -and ($v -eq $null))
{
Throw "Key property [$p] cannot be null."
}
if ($v -ne $null)
{
$o.AddProperty($p, $v)
}
}
function _AdvisorCreateBaseObject([string] $className, [string] $displayName)
{
$o = new-object PSObject
$o | Add-Member -MemberType NoteProperty -Name "ClassName" -Value $className
$o | Add-Member -MemberType NoteProperty -Name "DisplayName" -Value $displayName
$o | Add-Member -MemberType NoteProperty -Name "ParentClass" -Value $null
return $o
}


$scriptargs = new-object psobject
$scriptargs | add-member NoteProperty "SourceId" $SourceId
$scriptargs | add-member NoteProperty "ManagedEntityId" $ManagedEntityId


if (!$global:AdvisorEmulateRuntime)
{
$oAPI = new-object -comObject "MOM.ScriptAPI"
}


$discovery = New-Object PSObject
$discovery | Add-Member -MemberType NoteProperty -Name "_logFile" -Value $null
$discovery | Add-Member -MemberType NoteProperty -Name "_scomAPI" -Value $oAPI
$discovery | Add-Member -MemberType NoteProperty -Name "_discoveryData" -Value $null
$discovery | Add-Member -MemberType NoteProperty -Name "ParentClass" -Value $null
$discovery | Add-Member -MemberType NoteProperty -Name "Classes" -Value @()
$discovery | Add-Member -MemberType ScriptMethod -Name "AddInstance" -Value {
$o = $args[0]
$this.WriteDiscoveryDebugLog( "-Instance Added-", $o )
$this.Classes += $o
}
$discovery | Add-Member -MemberType ScriptMethod -Name "WriteEventLog" -Value {
$text = $args[0]
$eventId = $args[1]
$sev = $args[2]
if (($sev -eq $null) -or ($sev -gt 4)) { $sev = 0 }
if (($eventId -eq $null) -or ($eventId -lt 0) -or ($eventId -gt 20000)) { $eventId = 19000 }
if ($global:AdvisorEmulateRuntime)
{
Write-Debug "[Advisor Script(EventLog): Microsoft.KnowledgeServices.Lync.2010.ClientPolicy] ""$text"" $sev $eventId"
}
else
{
$this._scomAPI.LogScriptEvent("Advisor Script: Microsoft.KnowledgeServices.Lync.2010.ClientPolicy", $eventId, $sev, $text)
}
}
$discovery | Add-Member -MemberType ScriptMethod -Name "WriteDiscoveryDebugLog" -Value {
$u = [Environment]::UserDomainName + "\" + [Environment]::UserName
$date = Get-Date
$header = "$date`tMicrosoft.KnowledgeServices.Lync.2010.ClientPolicy`t$u"
if (($args -ne $null) -and ($args.Count -gt 0) -and ($args[0] -is [string]))
{
$header += "`t" + $args[0]
$args = @($args | Select-Object -Last ($args.Count-1))
}
$output = @($header, $args)
$output | Out-String -Width 256 | Write-Debug
if ($this._logFile -ne $null)
{
$output | Out-String | Add-Content -Path $this._logFile
}
}
$discovery | Add-Member -MemberType ScriptMethod -Name "CreateClassInstance" -Value {
return AdvisorCreateClassInstance "Microsoft.KnowledgeServices.Lync.2010.ClientPolicy"
}

$discoveryDebugFilePath = Join-Path $Env:ProgramFiles "\System Center Advisor\discovery.txt"
if (Test-Path $discoveryDebugFilePath)
{
$discovery._logFile = $discoveryDebugFilePath
}
del variable:\discoveryDebugFilePath -force &#x2013;ErrorAction SilentlyContinue

$discovery | Add-Member -MemberType ScriptMethod -Name "CreateDiscoveryData" -Value {
if ($global:AdvisorEmulateRuntime)
{
$i = 0
foreach ($o in $this.Classes)
{
$i = $i + 1
$this.WriteDiscoveryDebugLog("Discovered Class $i", $o )
}
}
else
{
$this._discoveryData = $this._scomAPI.CreateDiscoveryData(0, $scriptargs.SourceId, $scriptargs.ManagedEntityId)
foreach ($o in $this.Classes)
{
$instance = $null
switch ($o.ClassName)
{
"Microsoft.KnowledgeServices.Lync.2010.ClientPolicy"
{
$instance = $this._discoveryData.CreateClassInstance("$MPElement[Name='MicrosoftKnowledgeServicesLyncLibrary!Microsoft.KnowledgeServices.Lync.2010.ClientPolicy']$")

_AdvisorAddProperty $instance "$MPElement[Name='MicrosoftKnowledgeServicesLyncLibrary!Microsoft.KnowledgeServices.Lync.2010.ClientPolicy']/Identity$" $o.Identity $true
_AdvisorAddProperty $instance "$MPElement[Name='MicrosoftKnowledgeServicesLyncLibrary!Microsoft.KnowledgeServices.Lync.2010.ClientPolicy']/description$" $o.description $false
_AdvisorAddProperty $instance "$MPElement[Name='MicrosoftKnowledgeServicesLyncLibrary!Microsoft.KnowledgeServices.Lync.2010.ClientPolicy']/AddressBookAvailability$" $o.AddressBookAvailability $false
_AdvisorAddProperty $instance "$MPElement[Name='MicrosoftKnowledgeServicesLyncLibrary!Microsoft.KnowledgeServices.Lync.2010.ClientPolicy']/AttendantSafeTransfer$" $o.AttendantSafeTransfer $false
_AdvisorAddProperty $instance "$MPElement[Name='MicrosoftKnowledgeServicesLyncLibrary!Microsoft.KnowledgeServices.Lync.2010.ClientPolicy']/AutoDiscoveryRetryInterval$" $o.AutoDiscoveryRetryInterval $false
_AdvisorAddProperty $instance "$MPElement[Name='MicrosoftKnowledgeServicesLyncLibrary!Microsoft.KnowledgeServices.Lync.2010.ClientPolicy']/BlockConversationFromFederatedContacts$" $o.BlockConversationFromFederatedContacts $false
_AdvisorAddProperty $instance "$MPElement[Name='MicrosoftKnowledgeServicesLyncLibrary!Microsoft.KnowledgeServices.Lync.2010.ClientPolicy']/CalendarStatePublicationInterval$" $o.CalendarStatePublicationInterval $false
_AdvisorAddProperty $instance "$MPElement[Name='MicrosoftKnowledgeServicesLyncLibrary!Microsoft.KnowledgeServices.Lync.2010.ClientPolicy']/ConferenceIMIdleTimeout$" $o.ConferenceIMIdleTimeout $false
_AdvisorAddProperty $instance "$MPElement[Name='MicrosoftKnowledgeServicesLyncLibrary!Microsoft.KnowledgeServices.Lync.2010.ClientPolicy']/CustomizedHelpUrl$" $o.CustomizedHelpUrl $false
_AdvisorAddProperty $instance "$MPElement[Name='MicrosoftKnowledgeServicesLyncLibrary!Microsoft.KnowledgeServices.Lync.2010.ClientPolicy']/CustomLinkInErrorMessages$" $o.CustomLinkInErrorMessages $false
_AdvisorAddProperty $instance "$MPElement[Name='MicrosoftKnowledgeServicesLyncLibrary!Microsoft.KnowledgeServices.Lync.2010.ClientPolicy']/CustomStateUrl$" $o.CustomStateUrl $false
_AdvisorAddProperty $instance "$MPElement[Name='MicrosoftKnowledgeServicesLyncLibrary!Microsoft.KnowledgeServices.Lync.2010.ClientPolicy']/DGRefreshInterval$" $o.DGRefreshInterval $false
_AdvisorAddProperty $instance "$MPElement[Name='MicrosoftKnowledgeServicesLyncLibrary!Microsoft.KnowledgeServices.Lync.2010.ClientPolicy']/DisableCalendarPresence$" $o.DisableCalendarPresence $false
_AdvisorAddProperty $instance "$MPElement[Name='MicrosoftKnowledgeServicesLyncLibrary!Microsoft.KnowledgeServices.Lync.2010.ClientPolicy']/DisableContactCardOrganizationTab$" $o.DisableContactCardOrganizationTab $false
_AdvisorAddProperty $instance "$MPElement[Name='MicrosoftKnowledgeServicesLyncLibrary!Microsoft.KnowledgeServices.Lync.2010.ClientPolicy']/DisableEmailComparisonCheck$" $o.DisableEmailComparisonCheck $false
_AdvisorAddProperty $instance "$MPElement[Name='MicrosoftKnowledgeServicesLyncLibrary!Microsoft.KnowledgeServices.Lync.2010.ClientPolicy']/DisableEmoticons$" $o.DisableEmoticons $false
_AdvisorAddProperty $instance "$MPElement[Name='MicrosoftKnowledgeServicesLyncLibrary!Microsoft.KnowledgeServices.Lync.2010.ClientPolicy']/DisableFederatedPromptDisplayName$" $o.DisableFederatedPromptDisplayName $false
_AdvisorAddProperty $instance "$MPElement[Name='MicrosoftKnowledgeServicesLyncLibrary!Microsoft.KnowledgeServices.Lync.2010.ClientPolicy']/DisableFeedsTab$" $o.DisableFeedsTab $false
_AdvisorAddProperty $instance "$MPElement[Name='MicrosoftKnowledgeServicesLyncLibrary!Microsoft.KnowledgeServices.Lync.2010.ClientPolicy']/DisableFreeBusyInfo$" $o.DisableFreeBusyInfo $false
_AdvisorAddProperty $instance "$MPElement[Name='MicrosoftKnowledgeServicesLyncLibrary!Microsoft.KnowledgeServices.Lync.2010.ClientPolicy']/DisableHandsetOnLockedMachine$" $o.DisableHandsetOnLockedMachine $false
_AdvisorAddProperty $instance "$MPElement[Name='MicrosoftKnowledgeServicesLyncLibrary!Microsoft.KnowledgeServices.Lync.2010.ClientPolicy']/DisableHtmlIm$" $o.DisableHtmlIm $false
_AdvisorAddProperty $instance "$MPElement[Name='MicrosoftKnowledgeServicesLyncLibrary!Microsoft.KnowledgeServices.Lync.2010.ClientPolicy']/DisableICE$" $o.DisableICE $false
_AdvisorAddProperty $instance "$MPElement[Name='MicrosoftKnowledgeServicesLyncLibrary!Microsoft.KnowledgeServices.Lync.2010.ClientPolicy']/DisableInkIM$" $o.DisableInkIM $false
_AdvisorAddProperty $instance "$MPElement[Name='MicrosoftKnowledgeServicesLyncLibrary!Microsoft.KnowledgeServices.Lync.2010.ClientPolicy']/DisableMeetingSubjectAndLocation$" $o.DisableMeetingSubjectAndLocation $false
_AdvisorAddProperty $instance "$MPElement[Name='MicrosoftKnowledgeServicesLyncLibrary!Microsoft.KnowledgeServices.Lync.2010.ClientPolicy']/DisableOneNote12Integration$" $o.DisableOneNote12Integration $false
_AdvisorAddProperty $instance "$MPElement[Name='MicrosoftKnowledgeServicesLyncLibrary!Microsoft.KnowledgeServices.Lync.2010.ClientPolicy']/DisableOnlineContextualSearch$" $o.DisableOnlineContextualSearch $false
_AdvisorAddProperty $instance "$MPElement[Name='MicrosoftKnowledgeServicesLyncLibrary!Microsoft.KnowledgeServices.Lync.2010.ClientPolicy']/DisablePhonePresence$" $o.DisablePhonePresence $false
_AdvisorAddProperty $instance "$MPElement[Name='MicrosoftKnowledgeServicesLyncLibrary!Microsoft.KnowledgeServices.Lync.2010.ClientPolicy']/DisablePICPromptDisplayName$" $o.DisablePICPromptDisplayName $false
_AdvisorAddProperty $instance "$MPElement[Name='MicrosoftKnowledgeServicesLyncLibrary!Microsoft.KnowledgeServices.Lync.2010.ClientPolicy']/DisablePoorDeviceWarnings$" $o.DisablePoorDeviceWarnings $false
_AdvisorAddProperty $instance "$MPElement[Name='MicrosoftKnowledgeServicesLyncLibrary!Microsoft.KnowledgeServices.Lync.2010.ClientPolicy']/DisablePoorNetworkWarnings$" $o.DisablePoorNetworkWarnings $false
_AdvisorAddProperty $instance "$MPElement[Name='MicrosoftKnowledgeServicesLyncLibrary!Microsoft.KnowledgeServices.Lync.2010.ClientPolicy']/DisablePresenceNote$" $o.DisablePresenceNote $false
_AdvisorAddProperty $instance "$MPElement[Name='MicrosoftKnowledgeServicesLyncLibrary!Microsoft.KnowledgeServices.Lync.2010.ClientPolicy']/DisableRTFIM$" $o.DisableRTFIM $false
_AdvisorAddProperty $instance "$MPElement[Name='MicrosoftKnowledgeServicesLyncLibrary!Microsoft.KnowledgeServices.Lync.2010.ClientPolicy']/DisableSavingIM$" $o.DisableSavingIM $false
_AdvisorAddProperty $instance "$MPElement[Name='MicrosoftKnowledgeServicesLyncLibrary!Microsoft.KnowledgeServices.Lync.2010.ClientPolicy']/DisplayPhoto$" $o.DisplayPhoto $false
_AdvisorAddProperty $instance "$MPElement[Name='MicrosoftKnowledgeServicesLyncLibrary!Microsoft.KnowledgeServices.Lync.2010.ClientPolicy']/EnableAppearOffline$" $o.EnableAppearOffline $false
_AdvisorAddProperty $instance "$MPElement[Name='MicrosoftKnowledgeServicesLyncLibrary!Microsoft.KnowledgeServices.Lync.2010.ClientPolicy']/EnableCallLogAutoArchiving$" $o.EnableCallLogAutoArchiving $false
_AdvisorAddProperty $instance "$MPElement[Name='MicrosoftKnowledgeServicesLyncLibrary!Microsoft.KnowledgeServices.Lync.2010.ClientPolicy']/EnableClientMusicOnHold$" $o.EnableClientMusicOnHold $false
_AdvisorAddProperty $instance "$MPElement[Name='MicrosoftKnowledgeServicesLyncLibrary!Microsoft.KnowledgeServices.Lync.2010.ClientPolicy']/EnableConversationWindowTabs$" $o.EnableConversationWindowTabs $false
_AdvisorAddProperty $instance "$MPElement[Name='MicrosoftKnowledgeServicesLyncLibrary!Microsoft.KnowledgeServices.Lync.2010.ClientPolicy']/EnableEnterpriseCustomizedHelp$" $o.EnableEnterpriseCustomizedHelp $false
_AdvisorAddProperty $instance "$MPElement[Name='MicrosoftKnowledgeServicesLyncLibrary!Microsoft.KnowledgeServices.Lync.2010.ClientPolicy']/EnableEventLogging$" $o.EnableEventLogging $false
_AdvisorAddProperty $instance "$MPElement[Name='MicrosoftKnowledgeServicesLyncLibrary!Microsoft.KnowledgeServices.Lync.2010.ClientPolicy']/EnableExchangeContactSync$" $o.EnableExchangeContactSync $false
_AdvisorAddProperty $instance "$MPElement[Name='MicrosoftKnowledgeServicesLyncLibrary!Microsoft.KnowledgeServices.Lync.2010.ClientPolicy']/EnableExchangeDelegateSync$" $o.EnableExchangeDelegateSync $false
_AdvisorAddProperty $instance "$MPElement[Name='MicrosoftKnowledgeServicesLyncLibrary!Microsoft.KnowledgeServices.Lync.2010.ClientPolicy']/EnableFullScreenVideo$" $o.EnableFullScreenVideo $false
_AdvisorAddProperty $instance "$MPElement[Name='MicrosoftKnowledgeServicesLyncLibrary!Microsoft.KnowledgeServices.Lync.2010.ClientPolicy']/EnableHotdesking$" $o.EnableHotdesking $false
_AdvisorAddProperty $instance "$MPElement[Name='MicrosoftKnowledgeServicesLyncLibrary!Microsoft.KnowledgeServices.Lync.2010.ClientPolicy']/EnableIMAutoArchiving$" $o.EnableIMAutoArchiving $false
_AdvisorAddProperty $instance "$MPElement[Name='MicrosoftKnowledgeServicesLyncLibrary!Microsoft.KnowledgeServices.Lync.2010.ClientPolicy']/EnableNotificationForNewSubscribers$" $o.EnableNotificationForNewSubscribers $false
_AdvisorAddProperty $instance "$MPElement[Name='MicrosoftKnowledgeServicesLyncLibrary!Microsoft.KnowledgeServices.Lync.2010.ClientPolicy']/EnableSQMData$" $o.EnableSQMData $false
_AdvisorAddProperty $instance "$MPElement[Name='MicrosoftKnowledgeServicesLyncLibrary!Microsoft.KnowledgeServices.Lync.2010.ClientPolicy']/EnableTracing$" $o.EnableTracing $false
_AdvisorAddProperty $instance "$MPElement[Name='MicrosoftKnowledgeServicesLyncLibrary!Microsoft.KnowledgeServices.Lync.2010.ClientPolicy']/EnableUnencryptedFileTransfer$" $o.EnableUnencryptedFileTransfer $false
_AdvisorAddProperty $instance "$MPElement[Name='MicrosoftKnowledgeServicesLyncLibrary!Microsoft.KnowledgeServices.Lync.2010.ClientPolicy']/EnableUrl$" $o.EnableUrl $false
_AdvisorAddProperty $instance "$MPElement[Name='MicrosoftKnowledgeServicesLyncLibrary!Microsoft.KnowledgeServices.Lync.2010.ClientPolicy']/EnableVOIPCallDefault$" $o.EnableVOIPCallDefault $false
_AdvisorAddProperty $instance "$MPElement[Name='MicrosoftKnowledgeServicesLyncLibrary!Microsoft.KnowledgeServices.Lync.2010.ClientPolicy']/ExcludedContactFolders$" $o.ExcludedContactFolders $false
_AdvisorAddProperty $instance "$MPElement[Name='MicrosoftKnowledgeServicesLyncLibrary!Microsoft.KnowledgeServices.Lync.2010.ClientPolicy']/HotdeskingTimeout$" $o.HotdeskingTimeout $false
_AdvisorAddProperty $instance "$MPElement[Name='MicrosoftKnowledgeServicesLyncLibrary!Microsoft.KnowledgeServices.Lync.2010.ClientPolicy']/IMWarning$" $o.IMWarning $false
_AdvisorAddProperty $instance "$MPElement[Name='MicrosoftKnowledgeServicesLyncLibrary!Microsoft.KnowledgeServices.Lync.2010.ClientPolicy']/MAPIPollInterval$" $o.MAPIPollInterval $false
_AdvisorAddProperty $instance "$MPElement[Name='MicrosoftKnowledgeServicesLyncLibrary!Microsoft.KnowledgeServices.Lync.2010.ClientPolicy']/MaximumDGsAllowedInContactList$" $o.MaximumDGsAllowedInContactList $false
_AdvisorAddProperty $instance "$MPElement[Name='MicrosoftKnowledgeServicesLyncLibrary!Microsoft.KnowledgeServices.Lync.2010.ClientPolicy']/MaximumNumberOfContacts$" $o.MaximumNumberOfContacts $false
_AdvisorAddProperty $instance "$MPElement[Name='MicrosoftKnowledgeServicesLyncLibrary!Microsoft.KnowledgeServices.Lync.2010.ClientPolicy']/MaxPhotoSizeKb$" $o.MaxPhotoSizeKb $false
_AdvisorAddProperty $instance "$MPElement[Name='MicrosoftKnowledgeServicesLyncLibrary!Microsoft.KnowledgeServices.Lync.2010.ClientPolicy']/MusicOnHoldAudioFile$" $o.MusicOnHoldAudioFile $false
_AdvisorAddProperty $instance "$MPElement[Name='MicrosoftKnowledgeServicesLyncLibrary!Microsoft.KnowledgeServices.Lync.2010.ClientPolicy']/P2PAppSharingEncryption$" $o.P2PAppSharingEncryption $false
_AdvisorAddProperty $instance "$MPElement[Name='MicrosoftKnowledgeServicesLyncLibrary!Microsoft.KnowledgeServices.Lync.2010.ClientPolicy']/PlayAbbreviatedDialTone$" $o.PlayAbbreviatedDialTone $false
_AdvisorAddProperty $instance "$MPElement[Name='MicrosoftKnowledgeServicesLyncLibrary!Microsoft.KnowledgeServices.Lync.2010.ClientPolicy']/SearchPrefixFlags$" $o.SearchPrefixFlags $false
_AdvisorAddProperty $instance "$MPElement[Name='MicrosoftKnowledgeServicesLyncLibrary!Microsoft.KnowledgeServices.Lync.2010.ClientPolicy']/ShowManagePrivacyRelationships$" $o.ShowManagePrivacyRelationships $false
_AdvisorAddProperty $instance "$MPElement[Name='MicrosoftKnowledgeServicesLyncLibrary!Microsoft.KnowledgeServices.Lync.2010.ClientPolicy']/ShowRecentContacts$" $o.ShowRecentContacts $false
_AdvisorAddProperty $instance "$MPElement[Name='MicrosoftKnowledgeServicesLyncLibrary!Microsoft.KnowledgeServices.Lync.2010.ClientPolicy']/ShowSharepointPhotoEditLink$" $o.ShowSharepointPhotoEditLink $false
_AdvisorAddProperty $instance "$MPElement[Name='MicrosoftKnowledgeServicesLyncLibrary!Microsoft.KnowledgeServices.Lync.2010.ClientPolicy']/SPSearchCenterExternalURL$" $o.SPSearchCenterExternalURL $false
_AdvisorAddProperty $instance "$MPElement[Name='MicrosoftKnowledgeServicesLyncLibrary!Microsoft.KnowledgeServices.Lync.2010.ClientPolicy']/SPSearchCenterInternalURL$" $o.SPSearchCenterInternalURL $false
_AdvisorAddProperty $instance "$MPElement[Name='MicrosoftKnowledgeServicesLyncLibrary!Microsoft.KnowledgeServices.Lync.2010.ClientPolicy']/SPSearchExternalURL$" $o.SPSearchExternalURL $false
_AdvisorAddProperty $instance "$MPElement[Name='MicrosoftKnowledgeServicesLyncLibrary!Microsoft.KnowledgeServices.Lync.2010.ClientPolicy']/SPSearchInternalURL$" $o.SPSearchInternalURL $false
_AdvisorAddProperty $instance "$MPElement[Name='MicrosoftKnowledgeServicesLyncLibrary!Microsoft.KnowledgeServices.Lync.2010.ClientPolicy']/tabURL$" $o.tabURL $false
_AdvisorAddProperty $instance "$MPElement[Name='MicrosoftKnowledgeServicesLyncLibrary!Microsoft.KnowledgeServices.Lync.2010.ClientPolicy']/WebServicePollInterval$" $o.WebServicePollInterval $false
_AdvisorAddProperty $instance "$MPElement[Name='System!System.Entity']/DisplayName$" $o.DisplayName $false
_AdvisorAddProperty $instance "$MPElement[Name='MicrosoftKnowledgeServicesLyncLibrary!Microsoft.KnowledgeServices.Lync.2010.CsServer']/ReplicaFqdn$" $this.ParentClass.ReplicaFqdn $true
_AdvisorAddProperty $instance "$MPElement[Name='Windows!Microsoft.Windows.Computer']/PrincipalName$" $this.ParentClass.ParentClass.PrincipalName $true


}
default {Throw "Unsupported ClassName: " + $o.ClassName}
}
$this._discoveryData.AddInstance($instance)
}
return $this._discoveryData
}
}

function AdvisorCreateClassInstance([string] $className)
{
$o = $null
switch ($className)
{
"Microsoft.KnowledgeServices.Lync.2010.ClientPolicy"
{
$o = New-Object PSObject
$o | Add-Member -MemberType NoteProperty -Name ClassName -Value $className
$o | Add-Member -MemberType NoteProperty -Name DisplayName -Value "Lync Client Policy Configuration"

$o | Add-Member -MemberType NoteProperty -Name "Identity" -Value $null -Force
$o | Add-Member -MemberType NoteProperty -Name "description" -Value $null -Force
$o | Add-Member -MemberType NoteProperty -Name "AddressBookAvailability" -Value $null -Force
$o | Add-Member -MemberType NoteProperty -Name "AttendantSafeTransfer" -Value $null -Force
$o | Add-Member -MemberType NoteProperty -Name "AutoDiscoveryRetryInterval" -Value $null -Force
$o | Add-Member -MemberType NoteProperty -Name "BlockConversationFromFederatedContacts" -Value $null -Force
$o | Add-Member -MemberType NoteProperty -Name "CalendarStatePublicationInterval" -Value $null -Force
$o | Add-Member -MemberType NoteProperty -Name "ConferenceIMIdleTimeout" -Value $null -Force
$o | Add-Member -MemberType NoteProperty -Name "CustomizedHelpUrl" -Value $null -Force
$o | Add-Member -MemberType NoteProperty -Name "CustomLinkInErrorMessages" -Value $null -Force
$o | Add-Member -MemberType NoteProperty -Name "CustomStateUrl" -Value $null -Force
$o | Add-Member -MemberType NoteProperty -Name "DGRefreshInterval" -Value $null -Force
$o | Add-Member -MemberType NoteProperty -Name "DisableCalendarPresence" -Value $null -Force
$o | Add-Member -MemberType NoteProperty -Name "DisableContactCardOrganizationTab" -Value $null -Force
$o | Add-Member -MemberType NoteProperty -Name "DisableEmailComparisonCheck" -Value $null -Force
$o | Add-Member -MemberType NoteProperty -Name "DisableEmoticons" -Value $null -Force
$o | Add-Member -MemberType NoteProperty -Name "DisableFederatedPromptDisplayName" -Value $null -Force
$o | Add-Member -MemberType NoteProperty -Name "DisableFeedsTab" -Value $null -Force
$o | Add-Member -MemberType NoteProperty -Name "DisableFreeBusyInfo" -Value $null -Force
$o | Add-Member -MemberType NoteProperty -Name "DisableHandsetOnLockedMachine" -Value $null -Force
$o | Add-Member -MemberType NoteProperty -Name "DisableHtmlIm" -Value $null -Force
$o | Add-Member -MemberType NoteProperty -Name "DisableICE" -Value $null -Force
$o | Add-Member -MemberType NoteProperty -Name "DisableInkIM" -Value $null -Force
$o | Add-Member -MemberType NoteProperty -Name "DisableMeetingSubjectAndLocation" -Value $null -Force
$o | Add-Member -MemberType NoteProperty -Name "DisableOneNote12Integration" -Value $null -Force
$o | Add-Member -MemberType NoteProperty -Name "DisableOnlineContextualSearch" -Value $null -Force
$o | Add-Member -MemberType NoteProperty -Name "DisablePhonePresence" -Value $null -Force
$o | Add-Member -MemberType NoteProperty -Name "DisablePICPromptDisplayName" -Value $null -Force
$o | Add-Member -MemberType NoteProperty -Name "DisablePoorDeviceWarnings" -Value $null -Force
$o | Add-Member -MemberType NoteProperty -Name "DisablePoorNetworkWarnings" -Value $null -Force
$o | Add-Member -MemberType NoteProperty -Name "DisablePresenceNote" -Value $null -Force
$o | Add-Member -MemberType NoteProperty -Name "DisableRTFIM" -Value $null -Force
$o | Add-Member -MemberType NoteProperty -Name "DisableSavingIM" -Value $null -Force
$o | Add-Member -MemberType NoteProperty -Name "DisplayPhoto" -Value $null -Force
$o | Add-Member -MemberType NoteProperty -Name "EnableAppearOffline" -Value $null -Force
$o | Add-Member -MemberType NoteProperty -Name "EnableCallLogAutoArchiving" -Value $null -Force
$o | Add-Member -MemberType NoteProperty -Name "EnableClientMusicOnHold" -Value $null -Force
$o | Add-Member -MemberType NoteProperty -Name "EnableConversationWindowTabs" -Value $null -Force
$o | Add-Member -MemberType NoteProperty -Name "EnableEnterpriseCustomizedHelp" -Value $null -Force
$o | Add-Member -MemberType NoteProperty -Name "EnableEventLogging" -Value $null -Force
$o | Add-Member -MemberType NoteProperty -Name "EnableExchangeContactSync" -Value $null -Force
$o | Add-Member -MemberType NoteProperty -Name "EnableExchangeDelegateSync" -Value $null -Force
$o | Add-Member -MemberType NoteProperty -Name "EnableFullScreenVideo" -Value $null -Force
$o | Add-Member -MemberType NoteProperty -Name "EnableHotdesking" -Value $null -Force
$o | Add-Member -MemberType NoteProperty -Name "EnableIMAutoArchiving" -Value $null -Force
$o | Add-Member -MemberType NoteProperty -Name "EnableNotificationForNewSubscribers" -Value $null -Force
$o | Add-Member -MemberType NoteProperty -Name "EnableSQMData" -Value $null -Force
$o | Add-Member -MemberType NoteProperty -Name "EnableTracing" -Value $null -Force
$o | Add-Member -MemberType NoteProperty -Name "EnableUnencryptedFileTransfer" -Value $null -Force
$o | Add-Member -MemberType NoteProperty -Name "EnableUrl" -Value $null -Force
$o | Add-Member -MemberType NoteProperty -Name "EnableVOIPCallDefault" -Value $null -Force
$o | Add-Member -MemberType NoteProperty -Name "ExcludedContactFolders" -Value $null -Force
$o | Add-Member -MemberType NoteProperty -Name "HotdeskingTimeout" -Value $null -Force
$o | Add-Member -MemberType NoteProperty -Name "IMWarning" -Value $null -Force
$o | Add-Member -MemberType NoteProperty -Name "MAPIPollInterval" -Value $null -Force
$o | Add-Member -MemberType NoteProperty -Name "MaximumDGsAllowedInContactList" -Value $null -Force
$o | Add-Member -MemberType NoteProperty -Name "MaximumNumberOfContacts" -Value $null -Force
$o | Add-Member -MemberType NoteProperty -Name "MaxPhotoSizeKb" -Value $null -Force
$o | Add-Member -MemberType NoteProperty -Name "MusicOnHoldAudioFile" -Value $null -Force
$o | Add-Member -MemberType NoteProperty -Name "P2PAppSharingEncryption" -Value $null -Force
$o | Add-Member -MemberType NoteProperty -Name "PlayAbbreviatedDialTone" -Value $null -Force
$o | Add-Member -MemberType NoteProperty -Name "SearchPrefixFlags" -Value $null -Force
$o | Add-Member -MemberType NoteProperty -Name "ShowManagePrivacyRelationships" -Value $null -Force
$o | Add-Member -MemberType NoteProperty -Name "ShowRecentContacts" -Value $null -Force
$o | Add-Member -MemberType NoteProperty -Name "ShowSharepointPhotoEditLink" -Value $null -Force
$o | Add-Member -MemberType NoteProperty -Name "SPSearchCenterExternalURL" -Value $null -Force
$o | Add-Member -MemberType NoteProperty -Name "SPSearchCenterInternalURL" -Value $null -Force
$o | Add-Member -MemberType NoteProperty -Name "SPSearchExternalURL" -Value $null -Force
$o | Add-Member -MemberType NoteProperty -Name "SPSearchInternalURL" -Value $null -Force
$o | Add-Member -MemberType NoteProperty -Name "tabURL" -Value $null -Force
$o | Add-Member -MemberType NoteProperty -Name "WebServicePollInterval" -Value $null -Force


}
default {Throw "Unsupported ClassName: " + $className}
}
return $o
}



$current = _AdvisorCreateBaseObject "Microsoft.KnowledgeServices.Lync.2010.CsServer" ""
$current | Add-Member -MemberType NoteProperty -Name "ServerVersion" -Value "$Target/Property[Type="MicrosoftKnowledgeServicesLyncLibrary!Microsoft.KnowledgeServices.Lync.2010.CsServer"]/ServerVersion$" -Force
$current | Add-Member -MemberType NoteProperty -Name "ReplicaFqdn" -Value "$Target/Property[Type="MicrosoftKnowledgeServicesLyncLibrary!Microsoft.KnowledgeServices.Lync.2010.CsServer"]/ReplicaFqdn$" -Force
$current | Add-Member -MemberType NoteProperty -Name "UpToDate" -Value $null -Force;$current.UpToDate = _AdvisorGetTypedValue "Boolean" "$Target/Property[Type="MicrosoftKnowledgeServicesLyncLibrary!Microsoft.KnowledgeServices.Lync.2010.CsServer"]/UpToDate$"
$current | Add-Member -MemberType NoteProperty -Name "Pool" -Value "$Target/Property[Type="MicrosoftKnowledgeServicesLyncLibrary!Microsoft.KnowledgeServices.Lync.2010.CsServer"]/Pool$" -Force
$current | Add-Member -MemberType NoteProperty -Name "ServerLicense" -Value "$Target/Property[Type="MicrosoftKnowledgeServicesLyncLibrary!Microsoft.KnowledgeServices.Lync.2010.CsServer"]/ServerLicense$" -Force
$current | Add-Member -MemberType NoteProperty -Name "DisplayName" -Value "$Target/Property[Type="System!System.Entity"]/DisplayName$" -Force

$discovery.ParentClass = $current
$current = _AdvisorCreateBaseObject "Microsoft.Windows.Computer" ""
$current | Add-Member -MemberType NoteProperty -Name "PrincipalName" -Value "$Target/Host/Property[Type="Windows!Microsoft.Windows.Computer"]/PrincipalName$" -Force
$current | Add-Member -MemberType NoteProperty -Name "DNSName" -Value "$Target/Host/Property[Type="Windows!Microsoft.Windows.Computer"]/DNSName$" -Force
$current | Add-Member -MemberType NoteProperty -Name "NetbiosComputerName" -Value "$Target/Host/Property[Type="Windows!Microsoft.Windows.Computer"]/NetbiosComputerName$" -Force
$current | Add-Member -MemberType NoteProperty -Name "NetbiosDomainName" -Value "$Target/Host/Property[Type="Windows!Microsoft.Windows.Computer"]/NetbiosDomainName$" -Force
$current | Add-Member -MemberType NoteProperty -Name "IPAddress" -Value "$Target/Host/Property[Type="Windows!Microsoft.Windows.Computer"]/IPAddress$" -Force
$current | Add-Member -MemberType NoteProperty -Name "NetworkName" -Value "$Target/Host/Property[Type="Windows!Microsoft.Windows.Computer"]/NetworkName$" -Force
$current | Add-Member -MemberType NoteProperty -Name "ActiveDirectoryObjectSid" -Value "$Target/Host/Property[Type="Windows!Microsoft.Windows.Computer"]/ActiveDirectoryObjectSid$" -Force
$current | Add-Member -MemberType NoteProperty -Name "IsVirtualMachine" -Value $null -Force;$current.IsVirtualMachine = _AdvisorGetTypedValue "Boolean" "$Target/Host/Property[Type="Windows!Microsoft.Windows.Computer"]/IsVirtualMachine$"
$current | Add-Member -MemberType NoteProperty -Name "DomainDnsName" -Value "$Target/Host/Property[Type="Windows!Microsoft.Windows.Computer"]/DomainDnsName$" -Force
$current | Add-Member -MemberType NoteProperty -Name "OrganizationalUnit" -Value "$Target/Host/Property[Type="Windows!Microsoft.Windows.Computer"]/OrganizationalUnit$" -Force
$current | Add-Member -MemberType NoteProperty -Name "ForestDnsName" -Value "$Target/Host/Property[Type="Windows!Microsoft.Windows.Computer"]/ForestDnsName$" -Force
$current | Add-Member -MemberType NoteProperty -Name "ActiveDirectorySite" -Value "$Target/Host/Property[Type="Windows!Microsoft.Windows.Computer"]/ActiveDirectorySite$" -Force
$current | Add-Member -MemberType NoteProperty -Name "LogicalProcessors" -Value $null -Force;$current.LogicalProcessors = _AdvisorGetTypedValue "Integer" "$Target/Host/Property[Type="Windows!Microsoft.Windows.Computer"]/LogicalProcessors$"
$current | Add-Member -MemberType NoteProperty -Name "DisplayName" -Value "$Target/Property[Type="System!System.Entity"]/DisplayName$" -Force

$discovery.ParentClass.ParentClass = $current



[ScriptBlock]$mainScriptBlock = {
$script:lyncPath = ""
if (Join-Path $Env:CommonProgramFiles "\Microsoft Lync Server 2013\Modules\Lync\Lync.psd1" | Test-Path)
{
$script:lyncPath = Join-Path $Env:CommonProgramFiles "\Microsoft Lync Server 2013\Modules\Lync\Lync.psd1"
$script:lyncPSVer = 2013
}
elseif (Join-Path $Env:CommonProgramFiles "\Microsoft Lync Server 2010\Modules\Lync\Lync.psd1" | Test-Path)
{
$script:lyncPath = Join-Path $Env:CommonProgramFiles "\Microsoft Lync Server 2010\Modules\Lync\Lync.psd1"
$script:lyncPSVer = 2010
}
$ScriptEnv = new-object psobject
$ScriptEnv | add-member ScriptMethod "ImportLyncPSModule" -value {
$m = Get-Module -Name Lync
if ($m -eq $null)
{
Import-Module $script:lyncPath -ErrorAction:SilentlyContinue
}
}
$ScriptEnv | Add-Member ScriptMethod "IsCMSMaster" -Value {
Try
{
$cmsStatus = Get-CsManagementStoreReplicationStatus -CentralManagementStoreStatus
$agentHostFqdn = [System.Net.Dns]::GetHostByName([System.Net.Dns]::GetHostName()).HostName
return $cmsStatus.ActiveMasterFqdn -ieq $agentHostFqdn
}
Catch [Microsoft.Rtc.Management.ADConnect.CannotGetDomainInfoException]
{
}
Catch [Microsoft.Rtc.Common.Data.SqlConnectionException]
{
}
Catch [System.Data.SqlClient.SqlException]
{
}
return $false
}


$ScriptEnv | add-member ScriptMethod "GetCSClientPolicy" -value {
Get-CsClientPolicy
}


if ($script:lyncPath -ne "")
{
$ScriptEnv.ImportLyncPSModule()
if (-Not $ScriptEnv.IsCMSMaster())
{
break
}

$global:advisorDiscoveredObjects = $ScriptEnv.GetCSClientPolicy()
}

}

Function Test-NeedPSRemoting
{
$script:lyncPSVer = 0
if (Join-Path $Env:CommonProgramFiles "\Microsoft Lync Server 2013\Modules\Lync\Lync.psd1" | Test-Path)
{
$script:lyncPSVer = 2013
}
elseif (Join-Path $Env:CommonProgramFiles "\Microsoft Lync Server 2010\Modules\Lync\Lync.psd1" | Test-Path)
{
$script:lyncPSVer = 2010
}
$PSCLRVersion = [System.String]::Format("{0}.{1}", $PSVersionTable.CLRVersion.Major, $PSVersionTable.CLRVersion.Minor)
if (($PSCLRVersion -ieq "2.0") -and ($script:lyncPSVer -ieq 2013))
{
return $true
}
return $false
}

if ((Test-NeedPSRemoting))
{
[bool]$script:psRemotingEnabled = $false

$winRMService = (Get-Service WinRM -ErrorAction SilentlyContinue)
if ($winRMService -ne $null)
{
if ($winRMService.Status -ieq [System.ServiceProcess.ServiceControllerStatus]::Stopped)
{
$winRMService.Start()
$winRMService.WaitForStatus([System.ServiceProcess.ServiceControllerStatus]::Running, [System.TimeSpan]::FromSeconds(15))
}
$psSessionConfiguration = (Get-PSSessionConfiguration -Name "Microsoft.PowerShell" -ErrorAction SilentlyContinue)
if ($psSessionConfiguration.SecurityDescriptorSddl -ieq "O:NSG:BAD:P(A;;GA;;;BA)(A;;GA;;;RM)S:P(AU;FA;GA;;;WD)(AU;SA;GXGW;;;WD)")
{
winrm quickconfig -quiet
$script:psRemotingEnabled = $true
}
else
{


}
}


if ($script:psRemotingEnabled -eq $true)
{
$session = New-PSSession
Invoke-Command -Session $session -ScriptBlock $mainScriptBlock
$global:advisorDiscoveredObjects = Invoke-Command -Session $session -ScriptBlock {$global:advisorDiscoveredObjects}
Remove-PSSession -Session $session
}
}
else
{
&amp; $mainScriptBlock
}

Function AddDiscoveryInstance($discoveredObjects)
{
Function ObjToStr($obj)
{
if ($obj -ne $null)
{
$obj.ToString()
}
else
{
$obj
}
}

foreach ($item in $discoveredObjects)
{
$ClientPolicy = $discovery.CreateClassInstance()
$ClientPolicy.Identity = $item.Identity
$ClientPolicy.description = $item.description
$ClientPolicy.AddressBookAvailability = ObjToStr $item.AddressBookAvailability
$ClientPolicy.AttendantSafeTransfer = $item.AttendantSafeTransfer
$ClientPolicy.AutoDiscoveryRetryInterval = ObjToStr $item.AutoDiscoveryRetryInterval
$ClientPolicy.BlockConversationFromFederatedContacts = $item.BlockConversationFromFederatedContacts
$ClientPolicy.CalendarStatePublicationInterval = $item.CalendarStatePublicationInterval
$ClientPolicy.ConferenceIMIdleTimeout = ObjToStr $item.ConferenceIMIdleTimeout
$ClientPolicy.CustomizedHelpUrl = $item.CustomizedHelpUrl
$ClientPolicy.CustomLinkInErrorMessages = $item.CustomLinkInErrorMessages
$ClientPolicy.CustomStateUrl = $item.CustomStateUrl
$ClientPolicy.DGRefreshInterval = ObjToStr $item.DGRefreshInterval
$ClientPolicy.DisableCalendarPresence = $item.DisableCalendarPresence
$ClientPolicy.DisableContactCardOrganizationTab = $item.DisableContactCardOrganizationTab
$ClientPolicy.DisableEmailComparisonCheck = $item.DisableEmailComparisonCheck
$ClientPolicy.DisableEmoticons = $item.DisableEmoticons
$ClientPolicy.DisableFederatedPromptDisplayName = $item.DisableFederatedPromptDisplayName
$ClientPolicy.DisableFeedsTab = $item.DisableFeedsTab
$ClientPolicy.DisableFreeBusyInfo = $item.DisableFreeBusyInfo
$ClientPolicy.DisableHandsetOnLockedMachine = $item.DisableHandsetOnLockedMachine
$ClientPolicy.DisableHtmlIm = $item.DisableHtmlIm
$ClientPolicy.DisableICE = $item.DisableICE
$ClientPolicy.DisableInkIM = $item.DisableInkIM
$ClientPolicy.DisableMeetingSubjectAndLocation = $item.DisableMeetingSubjectAndLocation
$ClientPolicy.DisableOneNote12Integration = $item.DisableOneNote12Integration
$ClientPolicy.DisableOnlineContextualSearch = $item.DisableOnlineContextualSearch
$ClientPolicy.DisablePhonePresence = $item.DisablePhonePresence
$ClientPolicy.DisablePICPromptDisplayName = $item.DisablePICPromptDisplayName
$ClientPolicy.DisablePoorDeviceWarnings = $item.DisablePoorDeviceWarnings
$ClientPolicy.DisablePresenceNote = $item.DisablePresenceNote
$ClientPolicy.DisableRTFIM = $item.DisableRTFIM
$ClientPolicy.DisableSavingIM = $item.DisableSavingIM
$ClientPolicy.DisplayPhoto = ObjToStr $item.DisplayPhoto
$ClientPolicy.EnableAppearOffline = $item.EnableAppearOffline
$ClientPolicy.EnableCallLogAutoArchiving = $item.EnableCallLogAutoArchiving
$ClientPolicy.EnableClientMusicOnHold = $item.EnableClientMusicOnHold
$ClientPolicy.EnableConversationWindowTabs = $item.EnableConversationWindowTabs
$ClientPolicy.EnableEnterpriseCustomizedHelp = $item.EnableEnterpriseCustomizedHelp
$ClientPolicy.EnableEventLogging = $item.EnableEventLogging
$ClientPolicy.EnableExchangeContactSync = $item.EnableExchangeContactSync
$ClientPolicy.EnableExchangeDelegateSync = $item.EnableExchangeDelegateSync
$ClientPolicy.EnableFullScreenVideo = $item.EnableFullScreenVideo
$ClientPolicy.EnableHotdesking = $item.EnableHotdesking
$ClientPolicy.EnableIMAutoArchiving = $item.EnableIMAutoArchiving
$ClientPolicy.EnableNotificationForNewSubscribers = $item.EnableNotificationForNewSubscribers
$ClientPolicy.EnableSQMData = $item.EnableSQMData
$ClientPolicy.EnableTracing = $item.EnableTracing
$ClientPolicy.EnableUnencryptedFileTransfer = $item.EnableUnencryptedFileTransfer
$ClientPolicy.EnableUrl = $item.EnableUrl
$ClientPolicy.EnableVOIPCallDefault = $item.EnableVOIPCallDefault
$ClientPolicy.ExcludedContactFolders = $item.ExcludedContactFolders
$ClientPolicy.HotdeskingTimeout = ObjToStr $item.HotdeskingTimeout
$ClientPolicy.IMWarning = $item.IMWarning
$ClientPolicy.MAPIPollInterval = ObjToStr $item.MAPIPollInterval
$ClientPolicy.MaximumDGsAllowedInContactList = $item.MaximumDGsAllowedInContactList
$ClientPolicy.MaximumNumberOfContacts = $item.MaximumNumberOfContacts
$ClientPolicy.MaxPhotoSizeKb = $item.MaxPhotoSizeKb
$ClientPolicy.MusicOnHoldAudioFile = $item.MusicOnHoldAudioFile
$ClientPolicy.P2PAppSharingEncryption = ObjToStr $item.P2PAppSharingEncryption
$ClientPolicy.PlayAbbreviatedDialTone = $item.PlayAbbreviatedDialTone
$ClientPolicy.SearchPrefixFlags = $item.SearchPrefixFlags
$ClientPolicy.ShowManagePrivacyRelationships = $item.ShowManagePrivacyRelationships
$ClientPolicy.ShowRecentContacts = $item.ShowRecentContacts
$ClientPolicy.ShowSharepointPhotoEditLink = $item.ShowSharepointPhotoEditLink
$ClientPolicy.SPSearchCenterExternalURL = $item.SPSearchCenterExternalURL
$ClientPolicy.SPSearchCenterInternalURL = $item.SPSearchCenterInternalURL
$ClientPolicy.SPSearchExternalURL = $item.SPSearchExternalURL
$ClientPolicy.SPSearchInternalURL = $item.SPSearchInternalURL
$ClientPolicy.TabURL = $item.TabURL
$ClientPolicy.WebServicePollInterval = ObjToStr $item.WebServicePollInterval
$ClientPolicy.Displayname = "Lync Client Policy -[" + $item.identity + "]"
$discovery.AddInstance( $ClientPolicy )
}
}

if ($global:advisorDiscoveredObjects -ne $null)
{
AddDiscoveryInstance $global:advisorDiscoveredObjects
}

$discoverydata = $discovery.CreateDiscoveryData()
$discoverydata

</Script></ScriptBody>
<Parameters>
<Parameter>
<Name>SourceId</Name>
<Value>$MPElement$</Value>
</Parameter>
<Parameter>
<Name>ManagedEntityId</Name>
<Value>$Target/Id$</Value>
</Parameter>
</Parameters>
<TimeoutSeconds>300</TimeoutSeconds>
<StrictErrorHandling>false</StrictErrorHandling>
</DataSource>
</Discovery>