Quota error check

Anonymous
2024-02-03T15:49:56+00:00

I'm copying a large number of folders from one server to another. Unfortunately the destination server has  the disk and the volume different (so I can't make a mirror copy with the same path..) With a little patience I can create the list of powershell commands to create the quotas on the destination server

New-FsrmQuota -Path "D:\Vol01\folder1" -Size2GB -Template "QMPA"

Using New-FsrmQuota  by "running" from  powershell ISE  I cannot clearly see/verify the errors (example: the folder does not exist or the path does not exist) especially if the quotas to set are a large number (as 800) 

I was wondering if there is a way with powershell to  verify errors and have a list of unexecuted quotas, the type of error and the corresponding powershell command.

Windows Server | Remote and virtual desktops | PowerShell

Locked Question. This question was migrated from the Microsoft Support Community. You can vote on whether it's helpful, but you can't add comments or replies or follow the question. To protect privacy, user profiles for migrated questions are anonymized.

0 comments No comments
{count} votes

20 answers

Sort by: Most helpful
  1. Anonymous
    2024-02-09T04:02:23+00:00

    Do you run the script above with the same user as before? Run it in an elevated PowerShell windows and see if the issue persists. Also check the detailed errors which are stored in $Error.

    0 comments No comments
  2. Anonymous
    2024-02-09T16:04:01+00:00

    Yes, I am using the same admn account and also an elevated PowerShell windows.

    I have tested the new script on another server with the same result (access denied).

    It is very strange....

    0 comments No comments
  3. Anonymous
    2024-02-12T15:44:14+00:00

    Hi Ian_Xue,

    I couldn't find a solutiom.

    My account is an admin user. I have also run the script on the another server receiving the same error.

    Could the variable " $entry = $_" create this issue?

    0 comments No comments
  4. Anonymous
    2024-02-16T05:43:18+00:00

    Hi Marc_live,

    Sorry for the delay. Not sure which line causes the issue but "$entry = $_" simply assigns a value to the variable $entry. Can you post the detailed error messages that are stored in the variable $Error like $Error[0] and $Error[1]?

    0 comments No comments
  5. Anonymous
    2024-02-16T22:14:34+00:00

    Do you mean include in the script the variable $Error and see the value after it runs?

    PS: I have another query at: Get-FsrmQuota - Microsoft Community

    Thanks

    0 comments No comments