I was advised to go on here - from https://social.technet.microsoft.com/Forums/en-US/03e97939-aaa5-4da7-9385-9e86de0d99b9/error-setfsrmquotatemplate-0x80070057-the-parameter-is-incorrect?forum=winserverpowershell
Problem:
When I try to create new or modify settings for FSRM Quota Template, for example:
-------------------------------
#Create action
$Action= New-FsrmAction -Type Command -Command "C:\Windows\System32\cmd.exe"
#Create thresholds
$Threshold = New-FsrmQuotaThreshold -Percentage 80 -action $Action
$Threshold2 = New-FsrmQuotaThreshold -Percentage 95 -action $Action
#Create quota
Set-FsrmQuotaTemplate -name "Test" -size 1073741824 -Threshold $Threshold,$Threshold2
-------------------------------
Receive next errors:
------------------------------Set-FsrmQuotaTemplate : 0x80070057, The parameter is incorrect.
At line:1 char:9
+ Set-FsrmQuotaTemplate -name "Test" -size 1073741824 -Threshold $Threshol ...
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+ CategoryInfo : InvalidArgument: (MSFT_FSRMQuotaTemplate (Name = "Test"):Root/Microsoft/...RMQuotaTempla
te) [Set-FsrmQuotaTemplate], CimException
+ FullyQualifiedErrorId : MI RESULT 4,Set-FsrmQuotaTemplate
------------------------------
Maybe anyone can help me to resolve this errors.
P.S. if I add this settings manually (use gui) - work perfect, but if use command line - not work.