You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Usagesummary.ps1 does not properly handle [DateTime] variants for StartTime/EndTime #609
PS C:\Users\vmadmin\Documents> .\usagesummary.ps1
cmdlet usagesummary.ps1 at command pipeline position 1
Supply values for the following parameters:
StartTime: 2021-05-20
EndTime: 2021-06-01
Get-AzsSubscriberUsage : The reported date time '2021-05-20T00:00:00.0000000 00:00' is not in ISO 8601 format(YYYY-MM-DDTHH:mm:ss.sssZ).
At C:\Users\vmadmin\Documents\usagesummary.ps1:129 char:1
+ $result = Get-AzsSubscriberUsage -ReportedStartTime ("{0:yyyy-MM-ddT0 ...
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+ CategoryInfo : InvalidOperation: ({ SubscriptionI...ationToken = }:<>f__AnonymousType0`6) [Get-AzsSubscriberUsage_List], UndeclaredResponseException
+ FullyQualifiedErrorId : BadRequest,Microsoft.Azure.PowerShell.Cmdlets.CommerceAdmin.Cmdlets.GetAzsSubscriberUsage_List
changed the title [-]Usagesummary.ps1 does not properly handle [DateTime] varients for StartTime/EndTime[/-][+]Usagesummary.ps1 does not properly handle [DateTime] variants for StartTime/EndTime[/+]on Jun 3, 2021
Activity
cblackuk commentedon Jun 3, 2021
To me the error is correct, as it requires a certain format :-) the format provided does not match :-) but maybe I am missing something?
[-]Usagesummary.ps1 does not properly handle [DateTime] varients for StartTime/EndTime[/-][+]Usagesummary.ps1 does not properly handle [DateTime] variants for StartTime/EndTime[/+]easyveazie commentedon Jun 3, 2021
Chris Black (@cblackuk) I have added more context above.
cblackuk commentedon Jun 3, 2021
I just realised that I use a completely custom version of all this and for 129 we run for example
cblackuk commentedon Jun 3, 2021
The cmdlet itself only validates on [DateTime]
Or to be more accurate on [DateTime] and not being empty and being provided:
So if one works and the other one does not - it must be something to do with ARM post update?
cblackuk commentedon Jun 3, 2021
Mike Veazie (@easyveazie) For laughs... what if you pass to it this instead?
2021-20-05
2021-01-06