Maintain control of your Microsoft 365 data
Post Reply
Matt.Sharpe
Service Provider
Posts: 229
Liked: 19 times
Joined: Mar 29, 2016 3:37 pm
Full Name: Matt Sharpe
Contact:

Powershell Query Assistance - EnableSizeLimit:$False

Post by Matt.Sharpe »

We have over 220 object storage repositories which have the setting "sizelimit" enabled and we're wanting to turn this off for all repositories.

I've had a play with some queries and found the way to pull the repositories in question:

Get-VBOObjectStorageRepository | where "EnableSizeLimit" -eq True

I'm wanting a command to remove the setting for repositories in question but can't get it to work. I just get:

Cannot convert 'System.Object[]' to the type

Any ideas?

Code: Select all

$repos = Get-VBOObjectStorageRepository

foreach ($ObjectStorageRepository in $repos) {

Set-VBOObjectStorageRepository -EnableSizeLimit:$false

}
Andreas Neufert
VP, Product Management
Posts: 6749
Liked: 1408 times
Joined: May 04, 2011 8:36 am
Full Name: Andreas Neufert
Location: Germany
Contact:

Re: Powershell Query Assistance - EnableSizeLimit:$False

Post by Andreas Neufert »

You forgot to declare in the last line of your code on which object you want to execute the command.
Set-VBOObjectStorageRepository -ObjectStorageRepository $repository ...

Something similar to this maybe helps.

Code: Select all

$repos = Get-VBOObjectStorageRepository

foreach ($ObjectStorageRepository in $repos) {

Set-VBOObjectStorageRepository -ObjectStorageRepository $ObjectStorageRepository -EnableSizeLimit:$false

}
Andreas Neufert
VP, Product Management
Posts: 6749
Liked: 1408 times
Joined: May 04, 2011 8:36 am
Full Name: Andreas Neufert
Location: Germany
Contact:

Re: Powershell Query Assistance - EnableSizeLimit:$False

Post by Andreas Neufert »

Matt.Sharpe
Service Provider
Posts: 229
Liked: 19 times
Joined: Mar 29, 2016 3:37 pm
Full Name: Matt Sharpe
Contact:

Re: Powershell Query Assistance - EnableSizeLimit:$False

Post by Matt.Sharpe » 1 person likes this post

This is the resolution FYI

Code: Select all

$repos = Get-VBOObjectStorageRepository

foreach ($ObjectStorageRepository in $repos) 
{
        Set-VBOObjectStorageRepository -ObjectStorageRepository $ObjectStorageRepository -EnableSizeLimit:$false
}
Post Reply

Who is online

Users browsing this forum: No registered users and 10 guests