Accéder au contenu principal

Articles

Affichage des articles du avril, 2019

Office 365: Script PowerShell pour auditer l’usage de Microsoft Teams de votre tenant

  Il faut maintenant fournir les informations d’usage de Microsoft Teams, c’est ce que fait ce script. Import-Module MSOnline Import-Module MicrosoftTeams [string]$ReportPath = ".\Reports\" [string]$username = "Admin@yourtenant.onmicrosoft.com" [string]$PwdTXTPath = "C:\SECUREDPWD\ExportedPWD-$($username).txt" $secureStringPwd = ConvertTo-SecureString -string (Get-Content $PwdTXTPath) $cred = New-Object System.Management.Automation.PSCredential -ArgumentList $username, $secureStringPwd $session = New-PSSession -ConfigurationName Microsoft.Exchange -ConnectionUri  https://outlook.office365.com/powershell-liveid/  -Credential $cred -Authentication Basic -AllowRedirection Import-PSSession $session #Connect-MicrosoftTeams -Credential $cred Connect-MicrosoftTeams [int]$i = 1; $data = @() [string]$ListOfChannelNames = "" [string]$TeamOwnersEmails = "" [string]$TeamMembersEmails = "" [string]$TeamGuestsEmails = "" $ListOfTe...

Office 365: Script PowerShell pour auditer l’usage des Office Groups de votre tenant

Il faut maintenant fournir les informations d’usage des Office Groups, c’est ce que fait ce script. [string]$ReportPath = ".\Reports\" [string]$username = "Admin@yourtenant.onmicrosoft.com" [string]$PwdTXTPath = "C:\SECUREDPWD\ExportedPWD-$($username).txt" $secureStringPwd = ConvertTo-SecureString -string (Get-Content $PwdTXTPath) $adminCreds = New-Object System.Management.Automation.PSCredential $username, $secureStringPwd $UserCredential = $adminCreds #$userCredential = Get-Credential $session = New-PSSession -ConfigurationName Microsoft.Exchange -ConnectionUri  https://outlook.office365.com/powershell-liveid/  -Credential $UserCredential -Authentication Basic -AllowRedirection Import-PSSession $session $AllExistingGroups = Get-UnifiedGroup -IncludeAllProperties | Select ExternalDirectoryObjectId,Id,ServerName,Name,DisplayName,Alias,EmailAddresses,PrimarySmtpAddress,SharePointSiteUrl,Notes,Language, ManagedBy,ManagedByDetails,AccessType,GroupType,AutoSub...

Office 365: Script PowerShell pour auditer l’usage de OneDrive for Business de votre tenant

  Il faut maintenant fournir les informations d’usage de OneDrive for Business, c’est ce que fait ce script. [string]$username = "Admin@yourtenant.onmicrosoft.com" [string]$PwdTXTPath = "C:\SECUREDPWD\ExportedPWD-$($username).txt" [string]$ReportPath = ".\Reports\" [string]$TenantUrl = " https://YourTenant-admin.sharepoint.com" function Load-DLLandAssemblies {     [string]$defaultDLLPath = ""     # Load assemblies to PowerShell session     $defaultDLLPath = "C:\Program Files\SharePoint Online Management Shell\Microsoft.Online.SharePoint.PowerShell\Microsoft.SharePoint.Client.dll"     [System.Reflection.Assembly]::LoadFile($defaultDLLPath)     $defaultDLLPath = "C:\Program Files\SharePoint Online Management Shell\Microsoft.Online.SharePoint.PowerShell\Microsoft.SharePoint.Client.Runtime.dll"     [System.Reflection.Assembly]::LoadFile($defaultDLLPath)     $defaultDLLPath = "C:\Pro...