This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env pwsh | |
#requires -version 3 | |
<# | |
.SYNOPSIS | |
Clean out the Microsoft Teams cache | |
.DESCRIPTION | |
.PARAMETER AllUsers | |
Clean out the Teams cache directory for all profile on the workstation that have a Teams cache directory |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$Assignmentsc = @() | |
$TelephoneNumbers = (Get-CsOnlineTelephoneNumber -ResultSize 1000000) | |
ForEach ( $TelephoneNumber in $TelephoneNumbers ) { | |
$Assignment = Get-CsOnlineTelephoneNumber -TelephoneNumber $TelephoneNumber -ExpandLocation | Select-Object id, inventorytype, userid, @{Name="CivicAddressId";Expression={"$($_.Location.CivicAddressId)"}},@{Name="LocationId";Expression={"$($_.Location.LocationId)"}} | |
$Assignments += $Assignment | |
} | |
$FileName = "$(Get-Date -F yyy-MM-dd)_Assignments.csv" | |
$Assignments | Export=CSV -NoTypeInformation -Path $FileName | |
$CivicAddresses = Get-CsOnlineLisCivicAddress -ResultSize 1000000 | Select-Object CivicAddressId,HouseNumber,HouseNumberSuffix,PreDirectional,StreetName,StreetSuffix,PostDirectional,City,CityAlias,PostalCode,StateOrProvince,CountryOrRegion,Description,CompanyName,DefaultLocationId,ValidationStatus,Latitude,Longitude,Elin |