Welcome Forums General PowerShell Q&A Get-FSRMQuota

This topic contains 1 reply, has 2 voices, and was last updated by

3 years, 7 months ago.

  • Author
  • #25248

    Points: 0
    Rank: Member

    I am having an issue that I hope someone here can clue me in on. When I try to run the following script it does not work:
    $Qpath = $QPath = '"'+'D:\DATA\USERS\'+$User+'"'
    $QSize = Get-FSRMQuota -Path $QPath

    The error message is:
    Get-FSRMQuota : 0x80045306, The specified path is invalid.
    At line:9 char:10
    + $QSize = Get-FSRMQuota -Path $QPath
    + ~~~~~~~~~~~~~~~~~~~~~~~~~~
    + CategoryInfo : NotSpecified: (MSFT_FSRMQuota:Root/Microsoft/...
    /MSFT_FSRMQuota) [Get-FsrmQuota], CimException
    + FullyQualifiedErrorId : HRESULT 0x80045306,Get-FsrmQuota

    The odd thing if I take the contents of $QPath and paste them in place of $QPath it then works.

    Any ideas of what I'm doing wrong? All I am trying to do is to get user quotas, user by user.

  • #25249

    Points: 1,704
    Helping HandTeam Member
    Rank: Community Hero

    I'm having some trouble resolving all the quotes.

    $QPath = $QPath =

    Also doesn't make sense to me. What's the goal there?

    $QPath = "D:\DATA\USERS\$User"

    Is that sufficient? PowerShell will fill-in variable names inside double quotes. I don't think you need all that concatenating.

The topic ‘Get-FSRMQuota’ is closed to new replies.