Set-Mailbox -issuewarningquota giving me error when importing CSV

Welcome Forums General PowerShell Q&A Set-Mailbox -issuewarningquota giving me error when importing CSV

Viewing 7 reply threads
  • Author
    Posts
    • #206052
      Participant
      Topics: 1
      Replies: 3
      Points: 19
      Rank: Member

      Getting this code when running –

      Import-CSV “Filepath” | foreach {Set-Mailbox -IssueWarningQuota 46gb}

       

      “Cannot display the prompt for “Identity” because type “Microsoft.Exchange.Configuration.Tasks.MailboxIdParameter” cannot be loaded.”

       

      Whats the problem?

    • #206076
      Participant
      Topics: 2
      Replies: 1013
      Points: 2,093
      Helping Hand
      Rank: Community Hero

      There is not enough info here to help you. That one line should not be causing this and it has to be somewhere else in your code.

      This error is not unique, it can happen in various ways.

    • #206106
      Participant
      Topics: 1
      Replies: 20
      Points: 109
      Helping Hand
      Rank: Participant

      Try…

      (Import-Csv C:\temp\userlisttest.csv).Identity | %{Set-mailbox -Identity $_ -IssueWarningQuota 46gb}

      My CSV is formatted like…

      Identity
      mbidentity01
      mbidentity02
      etc...
      
      

       

    • #206115
      Participant
      Topics: 1
      Replies: 3
      Points: 19
      Rank: Member

      I have my CSV structured like this –

       

      Identity

      Email1@domain.com

      Email2@domain.com

      Email3@domain.com

       

      @p42p0wd3r I tried your code and am now getting an error reading  ”
      Cannot bind argument to parameter ‘Identity’ because it is null.”

       

       

    • #206259
      Participant
      Topics: 1
      Replies: 3
      Points: 19
      Rank: Member

      Try…

      <textarea class=”ace_text-input” style=”opacity: 0; height: 18px; width: 7px; left: 44px; top: 0px;” spellcheck=”false” wrap=”off”></textarea>

      1
      (Import-Csv C:\temp\userlisttest.csv).Identity | %{Set-mailbox Identity $_ IssueWarningQuota 46gb}
      XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX

      My CSV is formatted like…

      PowerShell
      6 lines

      <textarea class=”ace_text-input” style=”opacity: 0; height: 18px; width: 7px; left: 44px; top: 0px;” spellcheck=”false” wrap=”off”></textarea>

      1
      2
      3
      4
      5
      6
      Identity
      mbidentity01
      mbidentity02
      etc
      XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX

      I tried this

    • #206307
      Participant
      Topics: 1
      Replies: 20
      Points: 109
      Helping Hand
      Rank: Participant

      I tested on my Exchange 2016 and 2019 installs, worked just fine.  It gave me a warning “WARNING: Please update UseDatabaseQuotaDefaults to false in order for mailbox quotas to apply.”, which I added as “-UseDatabaseQuotaDefaults $false” and that warning went away.  The quota warning level was changed either way, but would be reset if it was using the default quotas, as the warning suggests.

      I also tested with a hybrid Exchange Online, Office 365, and I was NOT able to change the warning quota for those accounts via powershell.  The script doesn’t seem to do anything at all.  🙁  Even when I went after a single account, the quota was not adjusted.

    • #206355
      Participant
      Topics: 5
      Replies: 321
      Points: 436
      Helping Hand
      Rank: Contributor
      Import-CSV “Filepath” | ForEach-Object {
          Set-Mailbox -Identity $_.Identity -IssueWarningQuota 46gb
      }
      
    • #206574
      Participant
      Topics: 1
      Replies: 3
      Points: 19
      Rank: Member

      I tested on my Exchange 2016 and 2019 installs, worked just fine. It gave me a warning “WARNING: Please update UseDatabaseQuotaDefaults to false in order for mailbox quotas to apply.”, which I added as “-UseDatabaseQuotaDefaults $false” and that warning went away. The quota warning level was changed either way, but would be reset if it was using the default quotas, as the warning suggests.

      I also tested with a hybrid Exchange Online, Office 365, and I was NOT able to change the warning quota for those accounts via powershell. The script doesn’t seem to do anything at all. 🙁 Even when I went after a single account, the quota was not adjusted.

      Yea I had to do it the old fashioned way… It is okay though, maybe next time

Viewing 7 reply threads
  • You must be logged in to reply to this topic.