Archive

Archives pour 26/10/2009

Exporter la configuration OCS des utilisateurs d’une OU.

Exportation dans un fichier de la configuration OCS de tous les utilisateurs d’une OU.

?View Code POWERSHELL
$resfile = New-Item -ItemType file -Path COR_OCS_UsersConfList.txt -Force
Add-Content -Path $resfile -Value "DisplayName,Status,Enabled,PrimaryURI,UCEnabled,RemoteCallControlTelephonyEnabled,LineServerURI,LineURI,EnabledForInternetAccess,EnabledForEnhancedPresence,AllowOrganizeMeetingWithAnonymousParticipants"
 
Get-Mailbox -ResultSize unlimited -OrganizationalUnit "domain.local/FI07_Compta/Users/Standard" | foreach {
$Alias = $_.Alias
$DisplayName = $_.Name
$Conf= get-wmiobject -class MSFT_SIPESUserSetting | Where-Object { $_.DisplayName -eq $DisplayName }
If ( $Conf -ne $null)
{
Add-Content -Path $resfile -Value "$($Conf.DisplayName),OK,$($Conf.Enabled),$($Conf.PrimaryURI),$($Conf.UCEnabled),$($Conf.RemoteCallControlTelephonyEnabled),$($Conf.LineServerURI),$($Conf.LineURI),$($Conf.EnabledForInternetAccess),$($Conf.EnabledForEnhancedPresence),$($Conf.AllowOrganizeMeetingWithAnonymousParticipants)"
}
Else
{
Add-Content -Path $resfile -Value "$($DisplayName),NOK"
}
 
}
Invoke-Item $resfile
Categories: OCS 2007 Tags: