Forum Discussion
Dennis-Scherrer
Mar 26, 2025Brass Contributor
Sort SharePoint Online organization properties
There`re more than 200 organization properties in SPO. Whenever I just want to find out the status of a selected property, I realize that Get-SPOTenant isn`t very admin-freandly 😥 it won´t support ...
- Apr 03, 2025
Thank you michalkornet
With your code I was able to build a small script that gives me a sorted list.
$properties = Get-SPOTenant $propertiesArray = $properties.PSObject.Properties | ForEach-Object { [PSCustomObject]@{ Name = $_.Name; Value = $_.Value } } $propertiesArray | Sort-Object -Property Name
michalkornet
Apr 01, 2025Iron Contributor
Get-SPOTenant returns a single value with properties so this is the reason why filtering is not available. So if the case it to filter by properties maybe you can try something like this.
$properties = Get-SPOTenant
$propertiesArray = $properties.PSObject.Properties | ForEach-Object {
[PSCustomObject]@{ Key = $_.Name; Value = $_.Value }
}
$filteredProperties = $propertiesArray | Where-Object { $_.Key -eq "Name" }
$filteredProperties
- Dennis-ScherrerApr 03, 2025Brass Contributor
Thank you michalkornet
With your code I was able to build a small script that gives me a sorted list.
$properties = Get-SPOTenant $propertiesArray = $properties.PSObject.Properties | ForEach-Object { [PSCustomObject]@{ Name = $_.Name; Value = $_.Value } } $propertiesArray | Sort-Object -Property Name