Here is a simple script to get storage info from all sites on your SharePoint Online tenant, exported to a CSV file so that you can analyze it in Excel or Power BI. All it takes is modifying the SPAdminURL variable, log in and then run this script:
$SPAdminURL = "https://contoso-admin.sharepoint.com"
Connect-SPOService -Url $SPAdminURL
$siteInfo = Get-SPOSite -Limit ALL |Select Url, Title, GroupId, LastContentModifiedDate, Status, @{N='StorageUsageGB';E={$_.StorageUsageCurrent/1024}}, IsTeamsConnected, Owner
$siteInfo | Export-Csv -Path C:\temp\SPOSiteInfo.csv -NoTypeInformation
Connect-SPOService -Url $SPAdminURL
$siteInfo = Get-SPOSite -Limit ALL |Select Url, Title, GroupId, LastContentModifiedDate, Status, @{N='StorageUsageGB';E={$_.StorageUsageCurrent/1024}}, IsTeamsConnected, Owner
$siteInfo | Export-Csv -Path C:\temp\SPOSiteInfo.csv -NoTypeInformation
LastContentModifiedDate
Status
ResourceUsageCurrent
ResourceUsageAverage
StorageUsageCurrent
LockIssue
WebsCount
CompatibilityLevel
DisableSharingForNonOwnersStatus
HubSiteId
IsHubSite
RelatedGroupId
GroupId
Url
LocaleId
LockState
Owner
StorageQuota
StorageQuotaWarningLevel
ResourceQuota
ResourceQuotaWarningLevel
Template
Title
AllowSelfServiceUpgrade
DenyAddAndCustomizePages
PWAEnabled
SharingCapability
SiteDefinedSharingCapability
SandboxedCodeActivationCapability
DisableCompanyWideSharingLinks
DisableAppViews
DisableFlows
AuthenticationContextName
StorageQuotaType
RestrictedToGeo
ShowPeoplePickerSuggestionsForGuestUsers
SharingDomainRestrictionMode
SharingAllowedDomainList
SharingBlockedDomainList
ConditionalAccessPolicy
AllowDownloadingNonWebViewableFiles
LimitedAccessFileType
AllowEditing
SensitivityLabel
CommentsOnSitePagesDisabled
SocialBarOnSitePagesDisabled
DefaultSharingLinkType
DefaultLinkPermission
DefaultLinkToExistingAccess
AnonymousLinkExpirationInDays
OverrideTenantAnonymousLinkExpirationPolicy
ExternalUserExpirationInDays
OverrideTenantExternalUserExpirationPolicy
SharingLockDownEnabled
SharingLockDownCanBeCleared
InformationSegment
InformationBarriersMode
BlockDownloadLinksFileType
OverrideBlockUserInfoVisibility
IsTeamsConnected
IsTeamsChannelConnected
TeamsChannelType
MediaTranscription
ExcludedBlockDownloadGroupIds
ExcludeBlockDownloadPolicySiteOwners
BlockDownloadPolicy
LoopSharingCapability
LoopOverrideSharingCapability
LoopDefaultSharingLinkScope
LoopDefaultSharingLinkRole
RequestFilesLinkEnabled
RequestFilesLinkExpirationInDays
OverrideSharingCapability
DefaultShareLinkScope
DefaultShareLinkRole
ReadOnlyForUnmanagedDevices
RestrictedAccessControl
Status
ResourceUsageCurrent
ResourceUsageAverage
StorageUsageCurrent
LockIssue
WebsCount
CompatibilityLevel
DisableSharingForNonOwnersStatus
HubSiteId
IsHubSite
RelatedGroupId
GroupId
Url
LocaleId
LockState
Owner
StorageQuota
StorageQuotaWarningLevel
ResourceQuota
ResourceQuotaWarningLevel
Template
Title
AllowSelfServiceUpgrade
DenyAddAndCustomizePages
PWAEnabled
SharingCapability
SiteDefinedSharingCapability
SandboxedCodeActivationCapability
DisableCompanyWideSharingLinks
DisableAppViews
DisableFlows
AuthenticationContextName
StorageQuotaType
RestrictedToGeo
ShowPeoplePickerSuggestionsForGuestUsers
SharingDomainRestrictionMode
SharingAllowedDomainList
SharingBlockedDomainList
ConditionalAccessPolicy
AllowDownloadingNonWebViewableFiles
LimitedAccessFileType
AllowEditing
SensitivityLabel
CommentsOnSitePagesDisabled
SocialBarOnSitePagesDisabled
DefaultSharingLinkType
DefaultLinkPermission
DefaultLinkToExistingAccess
AnonymousLinkExpirationInDays
OverrideTenantAnonymousLinkExpirationPolicy
ExternalUserExpirationInDays
OverrideTenantExternalUserExpirationPolicy
SharingLockDownEnabled
SharingLockDownCanBeCleared
InformationSegment
InformationBarriersMode
BlockDownloadLinksFileType
OverrideBlockUserInfoVisibility
IsTeamsConnected
IsTeamsChannelConnected
TeamsChannelType
MediaTranscription
ExcludedBlockDownloadGroupIds
ExcludeBlockDownloadPolicySiteOwners
BlockDownloadPolicy
LoopSharingCapability
LoopOverrideSharingCapability
LoopDefaultSharingLinkScope
LoopDefaultSharingLinkRole
RequestFilesLinkEnabled
RequestFilesLinkExpirationInDays
OverrideSharingCapability
DefaultShareLinkScope
DefaultShareLinkRole
ReadOnlyForUnmanagedDevices
RestrictedAccessControl
Resources:
0 comments:
Post a Comment
Note: Only a member of this blog may post a comment.