azure-powershell
azure-powershell copied to clipboard
Get-AzRecoveryServicesBackupRecoveryPoint fails with "date String was not recognized as a valid DateTime".
Description
Failing in Az version 9.6.0. The command Get-AzRecoveryServicesBackupRecoveryPoint fails with error: Get-AzRecoveryServicesBackupRecoveryPoint -Item $BackupItem … | String '05/14/2023 11:14:09' was not recognized as a valid DateTime. This happens regardless if -startDate and -EndDate parameters passed to it or not. This happens for Australia regional settings: get-culture LCID Name DisplayName
3081 en-AU English (Australia) Looks Azure API returns the date in the string in US format which failed to convert to local date format. This was working in older versions of Az (sorry, I can't track exactly which version of Az this has started to happen, checked last few version, they all have the issue). If not possible to fix, any advises on workarounds would be great. Thank you!
Issue script & Debug output
PS C:\Repos\yyy\build> $vault = Get-AzRecoveryServicesVault -ResourceGroupName "yyyxxxxxx01" -Name "yyyxxxxxx01-rsv01"
PS C:\Repos\yyy\build> $BackupItem = Get-AzRecoveryServicesBackupItem -BackupManagementType "AzureVM" -WorkloadType "AzureVM" -Name "xxxxxx-adfs01" -VaultId $vault.ID
PS C:\Repos\yyy\build> $StartDate = (Get-Date).AddDays(-7) ; $EndDate = Get-Date
PS C:\Repos\yyy\build> $DebugPreference='Continue'
------------------
PS C:\Repos\yyy\build> Get-AzRecoveryServicesBackupRecoveryPoint -Item $BackupItem -StartDate $StartDate.ToUniversalTime() -EndDate $EndDate.ToUniversalTime() -VaultId $vault.ID
------------------
DEBUG: 10:06:29 AM - GetAzureRmRecoveryServicesBackupRecoveryPoint begin processing with ParameterSet 'DateTimeFilter'.
DEBUG: 10:06:29 AM - using account id '[email protected]'...
DEBUG: 10:06:29 AM - [ConfigManager] Got nothing from [DisplayBreakingChangeWarning], Module = [], Cmdlet = []. Returning default value [True].
DEBUG: Inside Restore. Going to create ResourceClient.
DEBUG: [Common.Authentication]: Authenticating using Account: '[email protected]', environment: 'AzureCloud', tenant: '123d7879-dd3e-4d9a-b2cd-e0a8a30201d2'
DEBUG: 10:06:30 AM - [ConfigManager] Got nothing from [EnableLoginByWam], Module = [], Cmdlet = []. Returning default value [False].
DEBUG: 10:06:30 AM - [SilentAuthenticator] Calling SharedTokenCacheCredential.GetTokenAsync - TenantId:'123d7879-dd3e-4d9a-b2cd-e0a8a30201d2', Scopes:'https://management.core.windows.net//.default', AuthorityHost:'https://login.microsoftonline.com/', UserId:'[email protected]'
DEBUG: SharedTokenCacheCredential.GetToken invoked. Scopes: [ https://management.core.windows.net//.default ] ParentRequestId:
DEBUG: False MSAL 4.49.1.0 MSAL.NetCore .NET 7.0.3 Microsoft Windows 10.0.19044 [2023-04-13 00:06:30Z - c5c4d956-5409-4994-9eb4-6c797506831b] IsLegacyAdalCacheEnabled: yes
DEBUG: False MSAL 4.49.1.0 MSAL.NetCore .NET 7.0.3 Microsoft Windows 10.0.19044 [2023-04-13 00:06:30Z - c5c4d956-5409-4994-9eb4-6c797506831b] [Region discovery] Not using a regional authority.
DEBUG: False MSAL 4.49.1.0 MSAL.NetCore .NET 7.0.3 Microsoft Windows 10.0.19044 [2023-04-13 00:06:30Z - c5c4d956-5409-4994-9eb4-6c797506831b] [Region discovery] Not using a regional authority.
DEBUG: False MSAL 4.49.1.0 MSAL.NetCore .NET 7.0.3 Microsoft Windows 10.0.19044 [2023-04-13 00:06:30Z - c5c4d956-5409-4994-9eb4-6c797506831b] IsLegacyAdalCacheEnabled: yes
DEBUG: False MSAL 4.49.1.0 MSAL.NetCore .NET 7.0.3 Microsoft Windows 10.0.19044 [2023-04-13 00:06:30Z - c5c4d956-5409-4994-9eb4-6c797506831b] IsLegacyAdalCacheEnabled: yes
DEBUG: False MSAL 4.49.1.0 MSAL.NetCore .NET 7.0.3 Microsoft Windows 10.0.19044 [2023-04-13 00:06:30Z] Found 1 cache accounts and 0 broker accounts
DEBUG: False MSAL 4.49.1.0 MSAL.NetCore .NET 7.0.3 Microsoft Windows 10.0.19044 [2023-04-13 00:06:30Z] Returning 1 accounts
DEBUG: False MSAL 4.49.1.0 MSAL.NetCore .NET 7.0.3 Microsoft Windows 10.0.19044 [2023-04-13 00:06:30Z - e8e75d5b-5da4-40ee-893c-3462e9d15c80] MSAL MSAL.NetCore with assembly version '4.49.1.0'. CorrelationId(e8e75d5b-5da4-40ee-893c-3462e9d15c80)
DEBUG: False MSAL 4.49.1.0 MSAL.NetCore .NET 7.0.3 Microsoft Windows 10.0.19044 [2023-04-13 00:06:30Z - e8e75d5b-5da4-40ee-893c-3462e9d15c80] === AcquireTokenSilent Parameters ===
DEBUG: False MSAL 4.49.1.0 MSAL.NetCore .NET 7.0.3 Microsoft Windows 10.0.19044 [2023-04-13 00:06:30Z - e8e75d5b-5da4-40ee-893c-3462e9d15c80] LoginHint provided: False
DEBUG: False MSAL 4.49.1.0 MSAL.NetCore .NET 7.0.3 Microsoft Windows 10.0.19044 [2023-04-13 00:06:30Z - e8e75d5b-5da4-40ee-893c-3462e9d15c80] Account provided: True
DEBUG: False MSAL 4.49.1.0 MSAL.NetCore .NET 7.0.3 Microsoft Windows 10.0.19044 [2023-04-13 00:06:30Z - e8e75d5b-5da4-40ee-893c-3462e9d15c80] ForceRefresh: False
DEBUG: False MSAL 4.49.1.0 MSAL.NetCore .NET 7.0.3 Microsoft Windows 10.0.19044 [2023-04-13 00:06:30Z - e8e75d5b-5da4-40ee-893c-3462e9d15c80]
=== Request Data ===
Authority Provided? - True
Scopes - https://management.core.windows.net//.default
Extra Query Params Keys (space separated) -
ApiId - AcquireTokenSilent
IsConfidentialClient - False
SendX5C - False
LoginHint ? False
IsBrokerConfigured - False
HomeAccountId - False
CorrelationId - e8e75d5b-5da4-40ee-893c-3462e9d15c80
UserAssertion set: False
LongRunningOboCacheKey set: False
Region configured:
DEBUG: False MSAL 4.49.1.0 MSAL.NetCore .NET 7.0.3 Microsoft Windows 10.0.19044 [2023-04-13 00:06:30Z - e8e75d5b-5da4-40ee-893c-3462e9d15c80] === Token Acquisition (SilentRequest) started:
Scopes: https://management.core.windows.net//.default
Authority Host: login.microsoftonline.com
DEBUG: False MSAL 4.49.1.0 MSAL.NetCore .NET 7.0.3 Microsoft Windows 10.0.19044 [2023-04-13 00:06:30Z - e8e75d5b-5da4-40ee-893c-3462e9d15c80] [Region discovery] Not using a regional authority.
DEBUG: False MSAL 4.49.1.0 MSAL.NetCore .NET 7.0.3 Microsoft Windows 10.0.19044 [2023-04-13 00:06:30Z - e8e75d5b-5da4-40ee-893c-3462e9d15c80] Access token is not expired. Returning the found cache entry. [Current time (04/13/2023 00:06:30) - Expiration Time (04/13/2023 00:28:55 +00:00) - Extended Expiration Time (04/13/2023 00:28:55 +00:00)]
DEBUG: False MSAL 4.49.1.0 MSAL.NetCore .NET 7.0.3 Microsoft Windows 10.0.19044 [2023-04-13 00:06:30Z - e8e75d5b-5da4-40ee-893c-3462e9d15c80] Returning access token found in cache. RefreshOn exists ? False
DEBUG: False MSAL 4.49.1.0 MSAL.NetCore .NET 7.0.3 Microsoft Windows 10.0.19044 [2023-04-13 00:06:30Z - e8e75d5b-5da4-40ee-893c-3462e9d15c80] [Region discovery] Not using a regional authority.
DEBUG: False MSAL 4.49.1.0 MSAL.NetCore .NET 7.0.3 Microsoft Windows 10.0.19044 [2023-04-13 00:06:30Z - e8e75d5b-5da4-40ee-893c-3462e9d15c80]
=== Token Acquisition finished successfully:
DEBUG: False MSAL 4.49.1.0 MSAL.NetCore .NET 7.0.3 Microsoft Windows 10.0.19044 [2023-04-13 00:06:30Z - e8e75d5b-5da4-40ee-893c-3462e9d15c80] AT expiration time: 13/04/2023 12:28:55 AM +00:00, scopes: https://management.core.windows.net//user_impersonation https://management.core.windows.net//.default. source: Cache
DEBUG: SharedTokenCacheCredential.GetToken succeeded. Scopes: [ https://management.core.windows.net//.default ] ParentRequestId: ExpiresOn: 2023-04-13T00:28:55.0000000+00:00
DEBUG: [Common.Authentication]: Received token with LoginType 'User', Tenant: '123d7879-dd3e-4d9a-b2cd-e0a8a30201d2', UserId: '[email protected]'
DEBUG: Client Created successfully
DEBUG: ParameterSet = DateTimeFilterParameterSet.
StartDate = 6/04/2023 12:05:35 AM EndDate = 13/04/2023 12:05:35 AM, Item.Name = VM;iaasvmcontainerv2;yyyxxxxxx01;xxxxxx-adfs01, Item.ContainerName = iaasvmcontainerv2;yyyxxxxxx01;xxxxxx-adfs01
DEBUG: [Common.Authentication]: Authenticating using Account: '[email protected]', environment: 'AzureCloud', tenant: '123d7879-dd3e-4d9a-b2cd-e0a8a30201d2'
DEBUG: 10:06:30 AM - [ConfigManager] Got nothing from [EnableLoginByWam], Module = [], Cmdlet = []. Returning default value [False].
DEBUG: 10:06:30 AM - [SilentAuthenticator] Calling SharedTokenCacheCredential.GetTokenAsync - TenantId:'123d7879-dd3e-4d9a-b2cd-e0a8a30201d2', Scopes:'https://management.core.windows.net//.default', AuthorityHost:'https://login.microsoftonline.com/', UserId:'[email protected]'
DEBUG: SharedTokenCacheCredential.GetToken invoked. Scopes: [ https://management.core.windows.net//.default ] ParentRequestId:
DEBUG: False MSAL 4.49.1.0 MSAL.NetCore .NET 7.0.3 Microsoft Windows 10.0.19044 [2023-04-13 00:06:30Z - bbb46fe4-fb19-4d1c-9880-00bb22e2aca4] IsLegacyAdalCacheEnabled: yes
DEBUG: False MSAL 4.49.1.0 MSAL.NetCore .NET 7.0.3 Microsoft Windows 10.0.19044 [2023-04-13 00:06:30Z - bbb46fe4-fb19-4d1c-9880-00bb22e2aca4] [Region discovery] Not using a regional authority.
DEBUG: False MSAL 4.49.1.0 MSAL.NetCore .NET 7.0.3 Microsoft Windows 10.0.19044 [2023-04-13 00:06:30Z - bbb46fe4-fb19-4d1c-9880-00bb22e2aca4] [Region discovery] Not using a regional authority.
DEBUG: False MSAL 4.49.1.0 MSAL.NetCore .NET 7.0.3 Microsoft Windows 10.0.19044 [2023-04-13 00:06:30Z - bbb46fe4-fb19-4d1c-9880-00bb22e2aca4] IsLegacyAdalCacheEnabled: yes
DEBUG: False MSAL 4.49.1.0 MSAL.NetCore .NET 7.0.3 Microsoft Windows 10.0.19044 [2023-04-13 00:06:30Z - bbb46fe4-fb19-4d1c-9880-00bb22e2aca4] IsLegacyAdalCacheEnabled: yes
DEBUG: False MSAL 4.49.1.0 MSAL.NetCore .NET 7.0.3 Microsoft Windows 10.0.19044 [2023-04-13 00:06:30Z] Found 1 cache accounts and 0 broker accounts
DEBUG: False MSAL 4.49.1.0 MSAL.NetCore .NET 7.0.3 Microsoft Windows 10.0.19044 [2023-04-13 00:06:30Z] Returning 1 accounts
DEBUG: False MSAL 4.49.1.0 MSAL.NetCore .NET 7.0.3 Microsoft Windows 10.0.19044 [2023-04-13 00:06:30Z - 1df727f0-ed45-49f1-969b-a6b43e08bfeb] MSAL MSAL.NetCore with assembly version '4.49.1.0'. CorrelationId(1df727f0-ed45-49f1-969b-a6b43e08bfeb)
DEBUG: False MSAL 4.49.1.0 MSAL.NetCore .NET 7.0.3 Microsoft Windows 10.0.19044 [2023-04-13 00:06:30Z - 1df727f0-ed45-49f1-969b-a6b43e08bfeb] === AcquireTokenSilent Parameters ===
DEBUG: False MSAL 4.49.1.0 MSAL.NetCore .NET 7.0.3 Microsoft Windows 10.0.19044 [2023-04-13 00:06:30Z - 1df727f0-ed45-49f1-969b-a6b43e08bfeb] LoginHint provided: False
DEBUG: False MSAL 4.49.1.0 MSAL.NetCore .NET 7.0.3 Microsoft Windows 10.0.19044 [2023-04-13 00:06:30Z - 1df727f0-ed45-49f1-969b-a6b43e08bfeb] Account provided: True
DEBUG: False MSAL 4.49.1.0 MSAL.NetCore .NET 7.0.3 Microsoft Windows 10.0.19044 [2023-04-13 00:06:30Z - 1df727f0-ed45-49f1-969b-a6b43e08bfeb] ForceRefresh: False
DEBUG: False MSAL 4.49.1.0 MSAL.NetCore .NET 7.0.3 Microsoft Windows 10.0.19044 [2023-04-13 00:06:30Z - 1df727f0-ed45-49f1-969b-a6b43e08bfeb]
=== Request Data ===
Authority Provided? - True
Scopes - https://management.core.windows.net//.default
Extra Query Params Keys (space separated) -
ApiId - AcquireTokenSilent
IsConfidentialClient - False
SendX5C - False
LoginHint ? False
IsBrokerConfigured - False
HomeAccountId - False
CorrelationId - 1df727f0-ed45-49f1-969b-a6b43e08bfeb
UserAssertion set: False
LongRunningOboCacheKey set: False
Region configured:
DEBUG: False MSAL 4.49.1.0 MSAL.NetCore .NET 7.0.3 Microsoft Windows 10.0.19044 [2023-04-13 00:06:30Z - 1df727f0-ed45-49f1-969b-a6b43e08bfeb] === Token Acquisition (SilentRequest) started:
Scopes: https://management.core.windows.net//.default
Authority Host: login.microsoftonline.com
DEBUG: False MSAL 4.49.1.0 MSAL.NetCore .NET 7.0.3 Microsoft Windows 10.0.19044 [2023-04-13 00:06:30Z - 1df727f0-ed45-49f1-969b-a6b43e08bfeb] [Region discovery] Not using a regional authority.
DEBUG: False MSAL 4.49.1.0 MSAL.NetCore .NET 7.0.3 Microsoft Windows 10.0.19044 [2023-04-13 00:06:30Z - 1df727f0-ed45-49f1-969b-a6b43e08bfeb] Access token is not expired. Returning the found cache entry. [Current time (04/13/2023 00:06:30) - Expiration Time (04/13/2023 00:28:55 +00:00) - Extended Expiration Time (04/13/2023 00:28:55 +00:00)]
DEBUG: False MSAL 4.49.1.0 MSAL.NetCore .NET 7.0.3 Microsoft Windows 10.0.19044 [2023-04-13 00:06:30Z - 1df727f0-ed45-49f1-969b-a6b43e08bfeb] Returning access token found in cache. RefreshOn exists ? False
DEBUG: False MSAL 4.49.1.0 MSAL.NetCore .NET 7.0.3 Microsoft Windows 10.0.19044 [2023-04-13 00:06:30Z - 1df727f0-ed45-49f1-969b-a6b43e08bfeb] [Region discovery] Not using a regional authority.
DEBUG: False MSAL 4.49.1.0 MSAL.NetCore .NET 7.0.3 Microsoft Windows 10.0.19044 [2023-04-13 00:06:30Z - 1df727f0-ed45-49f1-969b-a6b43e08bfeb]
=== Token Acquisition finished successfully:
DEBUG: False MSAL 4.49.1.0 MSAL.NetCore .NET 7.0.3 Microsoft Windows 10.0.19044 [2023-04-13 00:06:30Z - 1df727f0-ed45-49f1-969b-a6b43e08bfeb] AT expiration time: 13/04/2023 12:28:55 AM +00:00, scopes: https://management.core.windows.net//user_impersonation https://management.core.windows.net//.default. source: Cache
DEBUG: SharedTokenCacheCredential.GetToken succeeded. Scopes: [ https://management.core.windows.net//.default ] ParentRequestId: ExpiresOn: 2023-04-13T00:28:55.0000000+00:00
DEBUG: [Common.Authentication]: Received token with LoginType 'User', Tenant: '123d7879-dd3e-4d9a-b2cd-e0a8a30201d2', UserId: '[email protected]'
DEBUG: ============================ HTTP REQUEST ============================
HTTP Method:
GET
Absolute Uri:
https://management.azure.com/subscriptions/bxxxxxxx-xxxx-4090-xxxx-xxxxxxxxxxx/resourceGroups/yyyxxxxxx01/providers/Microsoft.RecoveryServices/vaults/yyyxxxxxx01-rsv01/backupFabrics/Azure/protectionContainers/IaasVMContainer%3Biaasvmcontainerv2%3Byyyxxxxxx01%3Bxxxxxx-adfs01/protectedItems/VM%3Biaasvmcontainerv2%3Byyyxxxxxx01%3Bxxxxxx-adfs01/recoveryPoints?$filter=startDate eq '2023-04-06 12:05:35 AM' and endDate eq '2023-04-13 12:05:35 AM'&api-version=2023-01-01
Headers:
Accept-Language : en-US
x-ms-client-request-id : 80e40d22-d4e5-456d-94c6-397e6dc938a0
Body:
DEBUG: ============================ HTTP RESPONSE ============================
Status Code:
OK
Headers:
Cache-Control : no-cache
Pragma : no-cache
X-Content-Type-Options : nosniff
x-ms-request-id : e3dc33b5-eb81-4a34-9874-be88c1cdad9a
x-ms-client-request-id : 80e40d22-d4e5-456d-94c6-397e6dc938a0
Server : Kestrel
x-ms-ratelimit-remaining-subscription-resource-requests: 149
x-ms-correlation-request-id : e3dc33b5-eb81-4a34-9874-be88c1cdad9a
x-ms-routing-request-id : AUSTRALIASOUTHEAST:20230413T000628Z:e3dc33b5-eb81-4a34-9874-be88c1cdad9a
Strict-Transport-Security : max-age=31536000; includeSubDomains
Date : Thu, 13 Apr 2023 00:06:27 GMT
Body:
{
"value": [
{
"id": "/subscriptions/bxxxxxxx-xxxx-4090-xxxx-xxxxxxxxxxx/resourceGroups/yyyxxxxxx01/providers/Microsoft.RecoveryServices/vaults/yyyxxxxxx01-rsv01/backupFabrics/Azure/protectionContainers/IaasVMContainer;iaasvmcontainerv2;yyyxxxxxx01;xxxxxx-adfs01/protectedItems/VM;iaasvmcontainerv2;yyyxxxxxx01;xxxxxx-adfs01/recoveryPoints/137681552423507",
"name": "137681552423507",
"type": "Microsoft.RecoveryServices/vaults/backupFabrics/protectionContainers/protectedItems/recoveryPoints",
"properties": {
"objectType": "IaasVMRecoveryPoint",
"recoveryPointType": "AppConsistent",
"recoveryPointTime": "2023-04-12T11:13:28.8252039Z",
"recoveryPointAdditionalInfo": "",
"sourceVMStorageType": "NormalStorage",
"isSourceVMEncrypted": false,
"isInstantIlrSessionActive": false,
"recoveryPointTierDetails": [
{
"type": "InstantRP",
"status": "Valid"
},
{
"type": "HardenedRP",
"status": "Valid"
}
],
"isManagedVirtualMachine": true,
"virtualMachineSize": "Standard_B2ms",
"originalStorageAccountOption": false,
"osType": "Windows",
"recoveryPointMoveReadinessInfo": {
"ArchivedRP": {
"isReadyForMove": false,
"additionalInfo": "Recovery point cannot be moved to Archive tier due to insufficient retention duration specified in policy.. Update policy on the protected item with appropriate retention setting and try again."
}
},
"isPrivateAccessEnabledOnAnyDisk": false
}
},
{
"id": "/subscriptions/bxxxxxxx-xxxx-4090-xxxx-xxxxxxxxxxx/resourceGroups/yyyxxxxxx01/providers/Microsoft.RecoveryServices/vaults/yyyxxxxxx01-rsv01/backupFabrics/Azure/protectionContainers/IaasVMContainer;iaasvmcontainerv2;yyyxxxxxx01;xxxxxx-adfs01/protectedItems/VM;iaasvmcontainerv2;yyyxxxxxx01;xxxxxx-adfs01/recoveryPoints/127210309092906",
"name": "127210309092906",
"type": "Microsoft.RecoveryServices/vaults/backupFabrics/protectionContainers/protectedItems/recoveryPoints",
"properties": {
"objectType": "IaasVMRecoveryPoint",
"recoveryPointType": "AppConsistent",
"recoveryPointTime": "2023-04-11T11:09:57.5199073Z",
"recoveryPointAdditionalInfo": "",
"sourceVMStorageType": "NormalStorage",
"isSourceVMEncrypted": false,
"isInstantIlrSessionActive": false,
"recoveryPointTierDetails": [
{
"type": "InstantRP",
"status": "Valid"
},
{
"type": "HardenedRP",
"status": "Valid"
}
],
"isManagedVirtualMachine": true,
"virtualMachineSize": "Standard_B2ms",
"originalStorageAccountOption": false,
"osType": "Windows",
"recoveryPointMoveReadinessInfo": {
"ArchivedRP": {
"isReadyForMove": false,
"additionalInfo": "Recovery point cannot be moved to Archive tier due to insufficient retention duration specified in policy.. Update policy on the protected item with appropriate retention setting and try again."
}
},
"isPrivateAccessEnabledOnAnyDisk": false
}
},
{
"id": "/subscriptions/bxxxxxxx-xxxx-4090-xxxx-xxxxxxxxxxx/resourceGroups/yyyxxxxxx01/providers/Microsoft.RecoveryServices/vaults/yyyxxxxxx01-rsv01/backupFabrics/Azure/protectionContainers/IaasVMContainer;iaasvmcontainerv2;yyyxxxxxx01;xxxxxx-adfs01/protectedItems/VM;iaasvmcontainerv2;yyyxxxxxx01;xxxxxx-adfs01/recoveryPoints/128030461959385",
"name": "128030461959385",
"type": "Microsoft.RecoveryServices/vaults/backupFabrics/protectionContainers/protectedItems/recoveryPoints",
"properties": {
"objectType": "IaasVMRecoveryPoint",
"recoveryPointType": "AppConsistent",
"recoveryPointTime": "2023-04-10T11:13:42.1997441Z",
"recoveryPointAdditionalInfo": "",
"sourceVMStorageType": "NormalStorage",
"isSourceVMEncrypted": false,
"isInstantIlrSessionActive": false,
"recoveryPointTierDetails": [
{
"type": "InstantRP",
"status": "Valid"
},
{
"type": "HardenedRP",
"status": "Valid"
}
],
"isManagedVirtualMachine": true,
"virtualMachineSize": "Standard_B2ms",
"originalStorageAccountOption": false,
"osType": "Windows",
"recoveryPointMoveReadinessInfo": {
"ArchivedRP": {
"isReadyForMove": false,
"additionalInfo": "Recovery point cannot be moved to Archive tier due to insufficient retention duration specified in policy.. Update policy on the protected item with appropriate retention setting and try again."
}
},
"recoveryPointProperties": {
"expiryTime": "2023-04-12T11:13:42.1997441",
"ruleName": "Daily",
"isSoftDeleted": false
},
"isPrivateAccessEnabledOnAnyDisk": false
}
},
{
"id": "/subscriptions/bxxxxxxx-xxxx-4090-xxxx-xxxxxxxxxxx/resourceGroups/yyyxxxxxx01/providers/Microsoft.RecoveryServices/vaults/yyyxxxxxx01-rsv01/backupFabrics/Azure/protectionContainers/IaasVMContainer;iaasvmcontainerv2;yyyxxxxxx01;xxxxxx-adfs01/protectedItems/VM;iaasvmcontainerv2;yyyxxxxxx01;xxxxxx-adfs01/recoveryPoints/128225584489836",
"name": "128225584489836",
"type": "Microsoft.RecoveryServices/vaults/backupFabrics/protectionContainers/protectedItems/recoveryPoints",
"properties": {
"objectType": "IaasVMRecoveryPoint",
"recoveryPointType": "AppConsistent",
"recoveryPointTime": "2023-04-09T11:14:09.165811Z",
"recoveryPointAdditionalInfo": "",
"sourceVMStorageType": "NormalStorage",
"isSourceVMEncrypted": false,
"isInstantIlrSessionActive": false,
"recoveryPointTierDetails": [
{
"type": "InstantRP",
"status": "Deleted"
},
{
"type": "HardenedRP",
"status": "Valid"
}
],
"isManagedVirtualMachine": true,
"virtualMachineSize": "Standard_B2ms",
"originalStorageAccountOption": false,
"osType": "Windows",
"recoveryPointMoveReadinessInfo": {
"ArchivedRP": {
"isReadyForMove": false,
"additionalInfo": "Recovery point cannot be moved to Archive tier due to insufficient retention duration specified in policy.. Update policy on the protected item with appropriate retention setting and try again."
}
},
"recoveryPointProperties": {
"expiryTime": "2023-05-14T11:14:09.165811",
"ruleName": "Weekly",
"isSoftDeleted": false
},
"isPrivateAccessEnabledOnAnyDisk": false
}
},
{
"id": "/subscriptions/bxxxxxxx-xxxx-4090-xxxx-xxxxxxxxxxx/resourceGroups/yyyxxxxxx01/providers/Microsoft.RecoveryServices/vaults/yyyxxxxxx01-rsv01/backupFabrics/Azure/protectionContainers/IaasVMContainer;iaasvmcontainerv2;yyyxxxxxx01;xxxxxx-adfs01/protectedItems/VM;iaasvmcontainerv2;yyyxxxxxx01;xxxxxx-adfs01/recoveryPoints/123760327780346",
"name": "123760327780346",
"type": "Microsoft.RecoveryServices/vaults/backupFabrics/protectionContainers/protectedItems/recoveryPoints",
"properties": {
"objectType": "IaasVMRecoveryPoint",
"recoveryPointType": "AppConsistent",
"recoveryPointTime": "2023-04-08T11:11:15.3797341Z",
"recoveryPointAdditionalInfo": "",
"sourceVMStorageType": "NormalStorage",
"isSourceVMEncrypted": false,
"isInstantIlrSessionActive": false,
"recoveryPointTierDetails": [
{
"type": "InstantRP",
"status": "Deleted"
},
{
"type": "HardenedRP",
"status": "Valid"
}
],
"isManagedVirtualMachine": true,
"virtualMachineSize": "Standard_B2ms",
"originalStorageAccountOption": false,
"osType": "Windows",
"recoveryPointMoveReadinessInfo": {
"ArchivedRP": {
"isReadyForMove": false,
"additionalInfo": "Recovery point cannot be moved to Archive tier due to insufficient retention duration specified in policy.. Update policy on the protected item with appropriate retention setting and try again."
}
},
"recoveryPointProperties": {
"expiryTime": "2023-04-15T11:11:15.3797341",
"ruleName": "Daily",
"isSoftDeleted": false
},
"isPrivateAccessEnabledOnAnyDisk": false
}
},
{
"id": "/subscriptions/bxxxxxxx-xxxx-4090-xxxx-xxxxxxxxxxx/resourceGroups/yyyxxxxxx01/providers/Microsoft.RecoveryServices/vaults/yyyxxxxxx01-rsv01/backupFabrics/Azure/protectionContainers/IaasVMContainer;iaasvmcontainerv2;yyyxxxxxx01;xxxxxx-adfs01/protectedItems/VM;iaasvmcontainerv2;yyyxxxxxx01;xxxxxx-adfs01/recoveryPoints/133553052084734",
"name": "133553052084734",
"type": "Microsoft.RecoveryServices/vaults/backupFabrics/protectionContainers/protectedItems/recoveryPoints",
"properties": {
"objectType": "IaasVMRecoveryPoint",
"recoveryPointType": "AppConsistent",
"recoveryPointTime": "2023-04-07T11:15:17.1985293Z",
"recoveryPointAdditionalInfo": "",
"sourceVMStorageType": "NormalStorage",
"isSourceVMEncrypted": false,
"isInstantIlrSessionActive": false,
"recoveryPointTierDetails": [
{
"type": "InstantRP",
"status": "Deleted"
},
{
"type": "HardenedRP",
"status": "Valid"
}
],
"isManagedVirtualMachine": true,
"virtualMachineSize": "Standard_B2ms",
"originalStorageAccountOption": false,
"osType": "Windows",
"recoveryPointMoveReadinessInfo": {
"ArchivedRP": {
"isReadyForMove": false,
"additionalInfo": "Recovery point cannot be moved to Archive tier due to insufficient retention duration specified in policy.. Update policy on the protected item with appropriate retention setting and try again."
}
},
"recoveryPointProperties": {
"expiryTime": "2023-04-14T11:15:17.1985293",
"ruleName": "Daily",
"isSoftDeleted": false
},
"isPrivateAccessEnabledOnAnyDisk": false
}
},
{
"id": "/subscriptions/bxxxxxxx-xxxx-4090-xxxx-xxxxxxxxxxx/resourceGroups/yyyxxxxxx01/providers/Microsoft.RecoveryServices/vaults/yyyxxxxxx01-rsv01/backupFabrics/Azure/protectionContainers/IaasVMContainer;iaasvmcontainerv2;yyyxxxxxx01;xxxxxx-adfs01/protectedItems/VM;iaasvmcontainerv2;yyyxxxxxx01;xxxxxx-adfs01/recoveryPoints/129766400052435",
"name": "129766400052435",
"type": "Microsoft.RecoveryServices/vaults/backupFabrics/protectionContainers/protectedItems/recoveryPoints",
"properties": {
"objectType": "IaasVMRecoveryPoint",
"recoveryPointType": "AppConsistent",
"recoveryPointTime": "2023-04-06T11:12:46.9641514Z",
"recoveryPointAdditionalInfo": "",
"sourceVMStorageType": "NormalStorage",
"isSourceVMEncrypted": false,
"isInstantIlrSessionActive": false,
"recoveryPointTierDetails": [
{
"type": "InstantRP",
"status": "Deleted"
},
{
"type": "HardenedRP",
"status": "Valid"
}
],
"isManagedVirtualMachine": true,
"virtualMachineSize": "Standard_B2ms",
"originalStorageAccountOption": false,
"osType": "Windows",
"recoveryPointMoveReadinessInfo": {
"ArchivedRP": {
"isReadyForMove": false,
"additionalInfo": "Recovery point cannot be moved to Archive tier due to insufficient retention duration specified in policy.. Update policy on the protected item with appropriate retention setting and try again."
}
},
"recoveryPointProperties": {
"expiryTime": "2023-04-13T11:12:46.9641514",
"ruleName": "Daily",
"isSoftDeleted": false
},
"isPrivateAccessEnabledOnAnyDisk": false
}
}
]
}
DEBUG: Caught exception, type: System.FormatException
DEBUG: 10:06:30 AM - [ConfigManager] Got [True] from [EnableDataCollection], Module = [], Cmdlet = [].
Get-AzRecoveryServicesBackupRecoveryPoint: String '05/14/2023 11:14:09' was not recognized as a valid DateTime.
DEBUG: 10:06:30 AM - [ConfigManager] Got nothing from [DisplayBreakingChangeWarning], Module = [], Cmdlet = []. Returning default value [True].
DEBUG: 10:06:30 AM - [ConfigManager] Got nothing from [DisplayRegionIdentified], Module = [], Cmdlet = []. Returning default value [True].
DEBUG: AzureQoSEvent: Module: Az.RecoveryServices:6.3.0; CommandName: Get-AzRecoveryServicesBackupRecoveryPoint; PSVersion: 7.3.3; IsSuccess: False; Duration: 00:00:00.6868054; Exception: String '05/14/2023 11:14:09' was not recognized as a valid DateTime.;
DEBUG: 10:06:31 AM - GetAzureRmRecoveryServicesBackupRecoveryPoint end processing.
PS C:\Repos\yyy\build>
Environment data
$PsversionTable
Name Value
---- -----
PSVersion 7.3.3
PSEdition Core
GitCommitId 7.3.3
OS Microsoft Windows 10.0.19044
Platform Win32NT
PSCompatibleVersions {1.0, 2.0, 3.0, 4.0…}
PSRemotingProtocolVersion 2.3
SerializationVersion 1.1.0.1
WSManStackVersion 3.0
Module versions
Get-module Az*
ModuleType Version PreRelease Name ExportedCommands
---------- ------- ---------- ---- ----------------
Script 2.12.1 Az.Accounts {Add-AzEnvironment, Clear-AzConfig, Clear-AzContext, Clear-AzDefault…}
Script 5.7.0 Az.Compute {Add-AzImageDataDisk, Add-AzVhd, Add-AzVMAdditionalUnattendContent, Add-AzVMDataDisk…}
Script 6.3.0 Az.RecoveryServices {Add-AzRecoveryServicesAsrReplicationProtectedItemDisk, Backup-AzRecoveryServicesBackupItem, Copy-AzRecoveryServicesVault, Disable-AzR…
Error output
Resolve-AzError
HistoryId: 31
Message : String '05/14/2023 11:14:09' was not recognized as a valid DateTime.
StackTrace : at System.DateTime.Parse(String s)
at Microsoft.Azure.Commands.RecoveryServices.Backup.Helpers.RecoveryPointConversions.GetPSAzureVMRecoveryPoint(RecoveryPointResource rp, ItemBase item)
at Microsoft.Azure.Commands.RecoveryServices.Backup.Helpers.RecoveryPointConversions.GetPSAzureRecoveryPoints(List`1 rpList, ItemBase item)
at Microsoft.Azure.Commands.RecoveryServices.Backup.Cmdlets.ProviderModel.AzureWorkloadProviderHelper.ListRecoveryPoints(Dictionary`2 ProviderData)
at Microsoft.Azure.Commands.RecoveryServices.Backup.Cmdlets.ProviderModel.IaasVmPsBackupProvider.ListRecoveryPoints()
at Microsoft.Azure.Commands.RecoveryServices.Backup.Cmdlets.GetAzureRmRecoveryServicesBackupRecoveryPoint.<ExecuteCmdlet>b__39_0()
at Microsoft.Azure.Commands.RecoveryServices.Backup.Cmdlets.RecoveryServicesBackupCmdletBase.ExecutionBlock(Action action, Boolean shouldProcess)
Exception : System.FormatException
InvocationInfo : {Get-AzRecoveryServicesBackupRecoveryPoint}
Line : Get-AzRecoveryServicesBackupRecoveryPoint -Item $BackupItem -StartDate $StartDate.ToUniversalTime() -EndDate $EndDate.ToUniversalTime() -VaultId $vault.ID
Position : At line:1 char:1
+ Get-AzRecoveryServicesBackupRecoveryPoint -Item $BackupItem -StartDat …
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
HistoryId : 31
Thanks for the feedback! We are routing this to the appropriate team for follow-up. cc @pvrk, @adityabalaji-msft.
Issue Details
Description
Failing in Az version 9.6.0. The command Get-AzRecoveryServicesBackupRecoveryPoint fails with error: Get-AzRecoveryServicesBackupRecoveryPoint -Item $BackupItem … | String '05/14/2023 11:14:09' was not recognized as a valid DateTime. This happens regardless if -startDate and -EndDate parameters passed to it or not. This happens for Australia regional settings: get-culture LCID Name DisplayName
3081 en-AU English (Australia) Looks Azure API returns the date in the string in US format which failed to convert to local date format. This was working in older versions of Az (sorry, I can't track exactly which version of Az this has started to happen, checked last few version, they all have the issue). If not possible to fix, any advises on workarounds would be great. Thank you!
Issue script & Debug output
PS C:\Repos\yyy\build> $vault = Get-AzRecoveryServicesVault -ResourceGroupName "yyyxxxxxx01" -Name "yyyxxxxxx01-rsv01"
PS C:\Repos\yyy\build> $BackupItem = Get-AzRecoveryServicesBackupItem -BackupManagementType "AzureVM" -WorkloadType "AzureVM" -Name "xxxxxx-adfs01" -VaultId $vault.ID
PS C:\Repos\yyy\build> $StartDate = (Get-Date).AddDays(-7) ; $EndDate = Get-Date
PS C:\Repos\yyy\build> $DebugPreference='Continue'
------------------
PS C:\Repos\yyy\build> Get-AzRecoveryServicesBackupRecoveryPoint -Item $BackupItem -StartDate $StartDate.ToUniversalTime() -EndDate $EndDate.ToUniversalTime() -VaultId $vault.ID
------------------
DEBUG: 10:06:29 AM - GetAzureRmRecoveryServicesBackupRecoveryPoint begin processing with ParameterSet 'DateTimeFilter'.
DEBUG: 10:06:29 AM - using account id '[email protected]'...
DEBUG: 10:06:29 AM - [ConfigManager] Got nothing from [DisplayBreakingChangeWarning], Module = [], Cmdlet = []. Returning default value [True].
DEBUG: Inside Restore. Going to create ResourceClient.
DEBUG: [Common.Authentication]: Authenticating using Account: '[email protected]', environment: 'AzureCloud', tenant: '123d7879-dd3e-4d9a-b2cd-e0a8a30201d2'
DEBUG: 10:06:30 AM - [ConfigManager] Got nothing from [EnableLoginByWam], Module = [], Cmdlet = []. Returning default value [False].
DEBUG: 10:06:30 AM - [SilentAuthenticator] Calling SharedTokenCacheCredential.GetTokenAsync - TenantId:'123d7879-dd3e-4d9a-b2cd-e0a8a30201d2', Scopes:'https://management.core.windows.net//.default', AuthorityHost:'https://login.microsoftonline.com/', UserId:'[email protected]'
DEBUG: SharedTokenCacheCredential.GetToken invoked. Scopes: [ https://management.core.windows.net//.default ] ParentRequestId:
DEBUG: False MSAL 4.49.1.0 MSAL.NetCore .NET 7.0.3 Microsoft Windows 10.0.19044 [2023-04-13 00:06:30Z - c5c4d956-5409-4994-9eb4-6c797506831b] IsLegacyAdalCacheEnabled: yes
DEBUG: False MSAL 4.49.1.0 MSAL.NetCore .NET 7.0.3 Microsoft Windows 10.0.19044 [2023-04-13 00:06:30Z - c5c4d956-5409-4994-9eb4-6c797506831b] [Region discovery] Not using a regional authority.
DEBUG: False MSAL 4.49.1.0 MSAL.NetCore .NET 7.0.3 Microsoft Windows 10.0.19044 [2023-04-13 00:06:30Z - c5c4d956-5409-4994-9eb4-6c797506831b] [Region discovery] Not using a regional authority.
DEBUG: False MSAL 4.49.1.0 MSAL.NetCore .NET 7.0.3 Microsoft Windows 10.0.19044 [2023-04-13 00:06:30Z - c5c4d956-5409-4994-9eb4-6c797506831b] IsLegacyAdalCacheEnabled: yes
DEBUG: False MSAL 4.49.1.0 MSAL.NetCore .NET 7.0.3 Microsoft Windows 10.0.19044 [2023-04-13 00:06:30Z - c5c4d956-5409-4994-9eb4-6c797506831b] IsLegacyAdalCacheEnabled: yes
DEBUG: False MSAL 4.49.1.0 MSAL.NetCore .NET 7.0.3 Microsoft Windows 10.0.19044 [2023-04-13 00:06:30Z] Found 1 cache accounts and 0 broker accounts
DEBUG: False MSAL 4.49.1.0 MSAL.NetCore .NET 7.0.3 Microsoft Windows 10.0.19044 [2023-04-13 00:06:30Z] Returning 1 accounts
DEBUG: False MSAL 4.49.1.0 MSAL.NetCore .NET 7.0.3 Microsoft Windows 10.0.19044 [2023-04-13 00:06:30Z - e8e75d5b-5da4-40ee-893c-3462e9d15c80] MSAL MSAL.NetCore with assembly version '4.49.1.0'. CorrelationId(e8e75d5b-5da4-40ee-893c-3462e9d15c80)
DEBUG: False MSAL 4.49.1.0 MSAL.NetCore .NET 7.0.3 Microsoft Windows 10.0.19044 [2023-04-13 00:06:30Z - e8e75d5b-5da4-40ee-893c-3462e9d15c80] === AcquireTokenSilent Parameters ===
DEBUG: False MSAL 4.49.1.0 MSAL.NetCore .NET 7.0.3 Microsoft Windows 10.0.19044 [2023-04-13 00:06:30Z - e8e75d5b-5da4-40ee-893c-3462e9d15c80] LoginHint provided: False
DEBUG: False MSAL 4.49.1.0 MSAL.NetCore .NET 7.0.3 Microsoft Windows 10.0.19044 [2023-04-13 00:06:30Z - e8e75d5b-5da4-40ee-893c-3462e9d15c80] Account provided: True
DEBUG: False MSAL 4.49.1.0 MSAL.NetCore .NET 7.0.3 Microsoft Windows 10.0.19044 [2023-04-13 00:06:30Z - e8e75d5b-5da4-40ee-893c-3462e9d15c80] ForceRefresh: False
DEBUG: False MSAL 4.49.1.0 MSAL.NetCore .NET 7.0.3 Microsoft Windows 10.0.19044 [2023-04-13 00:06:30Z - e8e75d5b-5da4-40ee-893c-3462e9d15c80]
=== Request Data ===
Authority Provided? - True
Scopes - https://management.core.windows.net//.default
Extra Query Params Keys (space separated) -
ApiId - AcquireTokenSilent
IsConfidentialClient - False
SendX5C - False
LoginHint ? False
IsBrokerConfigured - False
HomeAccountId - False
CorrelationId - e8e75d5b-5da4-40ee-893c-3462e9d15c80
UserAssertion set: False
LongRunningOboCacheKey set: False
Region configured:
DEBUG: False MSAL 4.49.1.0 MSAL.NetCore .NET 7.0.3 Microsoft Windows 10.0.19044 [2023-04-13 00:06:30Z - e8e75d5b-5da4-40ee-893c-3462e9d15c80] === Token Acquisition (SilentRequest) started:
Scopes: https://management.core.windows.net//.default
Authority Host: login.microsoftonline.com
DEBUG: False MSAL 4.49.1.0 MSAL.NetCore .NET 7.0.3 Microsoft Windows 10.0.19044 [2023-04-13 00:06:30Z - e8e75d5b-5da4-40ee-893c-3462e9d15c80] [Region discovery] Not using a regional authority.
DEBUG: False MSAL 4.49.1.0 MSAL.NetCore .NET 7.0.3 Microsoft Windows 10.0.19044 [2023-04-13 00:06:30Z - e8e75d5b-5da4-40ee-893c-3462e9d15c80] Access token is not expired. Returning the found cache entry. [Current time (04/13/2023 00:06:30) - Expiration Time (04/13/2023 00:28:55 +00:00) - Extended Expiration Time (04/13/2023 00:28:55 +00:00)]
DEBUG: False MSAL 4.49.1.0 MSAL.NetCore .NET 7.0.3 Microsoft Windows 10.0.19044 [2023-04-13 00:06:30Z - e8e75d5b-5da4-40ee-893c-3462e9d15c80] Returning access token found in cache. RefreshOn exists ? False
DEBUG: False MSAL 4.49.1.0 MSAL.NetCore .NET 7.0.3 Microsoft Windows 10.0.19044 [2023-04-13 00:06:30Z - e8e75d5b-5da4-40ee-893c-3462e9d15c80] [Region discovery] Not using a regional authority.
DEBUG: False MSAL 4.49.1.0 MSAL.NetCore .NET 7.0.3 Microsoft Windows 10.0.19044 [2023-04-13 00:06:30Z - e8e75d5b-5da4-40ee-893c-3462e9d15c80]
=== Token Acquisition finished successfully:
DEBUG: False MSAL 4.49.1.0 MSAL.NetCore .NET 7.0.3 Microsoft Windows 10.0.19044 [2023-04-13 00:06:30Z - e8e75d5b-5da4-40ee-893c-3462e9d15c80] AT expiration time: 13/04/2023 12:28:55 AM +00:00, scopes: https://management.core.windows.net//user_impersonation https://management.core.windows.net//.default. source: Cache
DEBUG: SharedTokenCacheCredential.GetToken succeeded. Scopes: [ https://management.core.windows.net//.default ] ParentRequestId: ExpiresOn: 2023-04-13T00:28:55.0000000+00:00
DEBUG: [Common.Authentication]: Received token with LoginType 'User', Tenant: '123d7879-dd3e-4d9a-b2cd-e0a8a30201d2', UserId: '[email protected]'
DEBUG: Client Created successfully
DEBUG: ParameterSet = DateTimeFilterParameterSet.
StartDate = 6/04/2023 12:05:35 AM EndDate = 13/04/2023 12:05:35 AM, Item.Name = VM;iaasvmcontainerv2;yyyxxxxxx01;xxxxxx-adfs01, Item.ContainerName = iaasvmcontainerv2;yyyxxxxxx01;xxxxxx-adfs01
DEBUG: [Common.Authentication]: Authenticating using Account: '[email protected]', environment: 'AzureCloud', tenant: '123d7879-dd3e-4d9a-b2cd-e0a8a30201d2'
DEBUG: 10:06:30 AM - [ConfigManager] Got nothing from [EnableLoginByWam], Module = [], Cmdlet = []. Returning default value [False].
DEBUG: 10:06:30 AM - [SilentAuthenticator] Calling SharedTokenCacheCredential.GetTokenAsync - TenantId:'123d7879-dd3e-4d9a-b2cd-e0a8a30201d2', Scopes:'https://management.core.windows.net//.default', AuthorityHost:'https://login.microsoftonline.com/', UserId:'[email protected]'
DEBUG: SharedTokenCacheCredential.GetToken invoked. Scopes: [ https://management.core.windows.net//.default ] ParentRequestId:
DEBUG: False MSAL 4.49.1.0 MSAL.NetCore .NET 7.0.3 Microsoft Windows 10.0.19044 [2023-04-13 00:06:30Z - bbb46fe4-fb19-4d1c-9880-00bb22e2aca4] IsLegacyAdalCacheEnabled: yes
DEBUG: False MSAL 4.49.1.0 MSAL.NetCore .NET 7.0.3 Microsoft Windows 10.0.19044 [2023-04-13 00:06:30Z - bbb46fe4-fb19-4d1c-9880-00bb22e2aca4] [Region discovery] Not using a regional authority.
DEBUG: False MSAL 4.49.1.0 MSAL.NetCore .NET 7.0.3 Microsoft Windows 10.0.19044 [2023-04-13 00:06:30Z - bbb46fe4-fb19-4d1c-9880-00bb22e2aca4] [Region discovery] Not using a regional authority.
DEBUG: False MSAL 4.49.1.0 MSAL.NetCore .NET 7.0.3 Microsoft Windows 10.0.19044 [2023-04-13 00:06:30Z - bbb46fe4-fb19-4d1c-9880-00bb22e2aca4] IsLegacyAdalCacheEnabled: yes
DEBUG: False MSAL 4.49.1.0 MSAL.NetCore .NET 7.0.3 Microsoft Windows 10.0.19044 [2023-04-13 00:06:30Z - bbb46fe4-fb19-4d1c-9880-00bb22e2aca4] IsLegacyAdalCacheEnabled: yes
DEBUG: False MSAL 4.49.1.0 MSAL.NetCore .NET 7.0.3 Microsoft Windows 10.0.19044 [2023-04-13 00:06:30Z] Found 1 cache accounts and 0 broker accounts
DEBUG: False MSAL 4.49.1.0 MSAL.NetCore .NET 7.0.3 Microsoft Windows 10.0.19044 [2023-04-13 00:06:30Z] Returning 1 accounts
DEBUG: False MSAL 4.49.1.0 MSAL.NetCore .NET 7.0.3 Microsoft Windows 10.0.19044 [2023-04-13 00:06:30Z - 1df727f0-ed45-49f1-969b-a6b43e08bfeb] MSAL MSAL.NetCore with assembly version '4.49.1.0'. CorrelationId(1df727f0-ed45-49f1-969b-a6b43e08bfeb)
DEBUG: False MSAL 4.49.1.0 MSAL.NetCore .NET 7.0.3 Microsoft Windows 10.0.19044 [2023-04-13 00:06:30Z - 1df727f0-ed45-49f1-969b-a6b43e08bfeb] === AcquireTokenSilent Parameters ===
DEBUG: False MSAL 4.49.1.0 MSAL.NetCore .NET 7.0.3 Microsoft Windows 10.0.19044 [2023-04-13 00:06:30Z - 1df727f0-ed45-49f1-969b-a6b43e08bfeb] LoginHint provided: False
DEBUG: False MSAL 4.49.1.0 MSAL.NetCore .NET 7.0.3 Microsoft Windows 10.0.19044 [2023-04-13 00:06:30Z - 1df727f0-ed45-49f1-969b-a6b43e08bfeb] Account provided: True
DEBUG: False MSAL 4.49.1.0 MSAL.NetCore .NET 7.0.3 Microsoft Windows 10.0.19044 [2023-04-13 00:06:30Z - 1df727f0-ed45-49f1-969b-a6b43e08bfeb] ForceRefresh: False
DEBUG: False MSAL 4.49.1.0 MSAL.NetCore .NET 7.0.3 Microsoft Windows 10.0.19044 [2023-04-13 00:06:30Z - 1df727f0-ed45-49f1-969b-a6b43e08bfeb]
=== Request Data ===
Authority Provided? - True
Scopes - https://management.core.windows.net//.default
Extra Query Params Keys (space separated) -
ApiId - AcquireTokenSilent
IsConfidentialClient - False
SendX5C - False
LoginHint ? False
IsBrokerConfigured - False
HomeAccountId - False
CorrelationId - 1df727f0-ed45-49f1-969b-a6b43e08bfeb
UserAssertion set: False
LongRunningOboCacheKey set: False
Region configured:
DEBUG: False MSAL 4.49.1.0 MSAL.NetCore .NET 7.0.3 Microsoft Windows 10.0.19044 [2023-04-13 00:06:30Z - 1df727f0-ed45-49f1-969b-a6b43e08bfeb] === Token Acquisition (SilentRequest) started:
Scopes: https://management.core.windows.net//.default
Authority Host: login.microsoftonline.com
DEBUG: False MSAL 4.49.1.0 MSAL.NetCore .NET 7.0.3 Microsoft Windows 10.0.19044 [2023-04-13 00:06:30Z - 1df727f0-ed45-49f1-969b-a6b43e08bfeb] [Region discovery] Not using a regional authority.
DEBUG: False MSAL 4.49.1.0 MSAL.NetCore .NET 7.0.3 Microsoft Windows 10.0.19044 [2023-04-13 00:06:30Z - 1df727f0-ed45-49f1-969b-a6b43e08bfeb] Access token is not expired. Returning the found cache entry. [Current time (04/13/2023 00:06:30) - Expiration Time (04/13/2023 00:28:55 +00:00) - Extended Expiration Time (04/13/2023 00:28:55 +00:00)]
DEBUG: False MSAL 4.49.1.0 MSAL.NetCore .NET 7.0.3 Microsoft Windows 10.0.19044 [2023-04-13 00:06:30Z - 1df727f0-ed45-49f1-969b-a6b43e08bfeb] Returning access token found in cache. RefreshOn exists ? False
DEBUG: False MSAL 4.49.1.0 MSAL.NetCore .NET 7.0.3 Microsoft Windows 10.0.19044 [2023-04-13 00:06:30Z - 1df727f0-ed45-49f1-969b-a6b43e08bfeb] [Region discovery] Not using a regional authority.
DEBUG: False MSAL 4.49.1.0 MSAL.NetCore .NET 7.0.3 Microsoft Windows 10.0.19044 [2023-04-13 00:06:30Z - 1df727f0-ed45-49f1-969b-a6b43e08bfeb]
=== Token Acquisition finished successfully:
DEBUG: False MSAL 4.49.1.0 MSAL.NetCore .NET 7.0.3 Microsoft Windows 10.0.19044 [2023-04-13 00:06:30Z - 1df727f0-ed45-49f1-969b-a6b43e08bfeb] AT expiration time: 13/04/2023 12:28:55 AM +00:00, scopes: https://management.core.windows.net//user_impersonation https://management.core.windows.net//.default. source: Cache
DEBUG: SharedTokenCacheCredential.GetToken succeeded. Scopes: [ https://management.core.windows.net//.default ] ParentRequestId: ExpiresOn: 2023-04-13T00:28:55.0000000+00:00
DEBUG: [Common.Authentication]: Received token with LoginType 'User', Tenant: '123d7879-dd3e-4d9a-b2cd-e0a8a30201d2', UserId: '[email protected]'
DEBUG: ============================ HTTP REQUEST ============================
HTTP Method:
GET
Absolute Uri:
https://management.azure.com/subscriptions/bxxxxxxx-xxxx-4090-xxxx-xxxxxxxxxxx/resourceGroups/yyyxxxxxx01/providers/Microsoft.RecoveryServices/vaults/yyyxxxxxx01-rsv01/backupFabrics/Azure/protectionContainers/IaasVMContainer%3Biaasvmcontainerv2%3Byyyxxxxxx01%3Bxxxxxx-adfs01/protectedItems/VM%3Biaasvmcontainerv2%3Byyyxxxxxx01%3Bxxxxxx-adfs01/recoveryPoints?$filter=startDate eq '2023-04-06 12:05:35 AM' and endDate eq '2023-04-13 12:05:35 AM'&api-version=2023-01-01
Headers:
Accept-Language : en-US
x-ms-client-request-id : 80e40d22-d4e5-456d-94c6-397e6dc938a0
Body:
DEBUG: ============================ HTTP RESPONSE ============================
Status Code:
OK
Headers:
Cache-Control : no-cache
Pragma : no-cache
X-Content-Type-Options : nosniff
x-ms-request-id : e3dc33b5-eb81-4a34-9874-be88c1cdad9a
x-ms-client-request-id : 80e40d22-d4e5-456d-94c6-397e6dc938a0
Server : Kestrel
x-ms-ratelimit-remaining-subscription-resource-requests: 149
x-ms-correlation-request-id : e3dc33b5-eb81-4a34-9874-be88c1cdad9a
x-ms-routing-request-id : AUSTRALIASOUTHEAST:20230413T000628Z:e3dc33b5-eb81-4a34-9874-be88c1cdad9a
Strict-Transport-Security : max-age=31536000; includeSubDomains
Date : Thu, 13 Apr 2023 00:06:27 GMT
Body:
{
"value": [
{
"id": "/subscriptions/bxxxxxxx-xxxx-4090-xxxx-xxxxxxxxxxx/resourceGroups/yyyxxxxxx01/providers/Microsoft.RecoveryServices/vaults/yyyxxxxxx01-rsv01/backupFabrics/Azure/protectionContainers/IaasVMContainer;iaasvmcontainerv2;yyyxxxxxx01;xxxxxx-adfs01/protectedItems/VM;iaasvmcontainerv2;yyyxxxxxx01;xxxxxx-adfs01/recoveryPoints/137681552423507",
"name": "137681552423507",
"type": "Microsoft.RecoveryServices/vaults/backupFabrics/protectionContainers/protectedItems/recoveryPoints",
"properties": {
"objectType": "IaasVMRecoveryPoint",
"recoveryPointType": "AppConsistent",
"recoveryPointTime": "2023-04-12T11:13:28.8252039Z",
"recoveryPointAdditionalInfo": "",
"sourceVMStorageType": "NormalStorage",
"isSourceVMEncrypted": false,
"isInstantIlrSessionActive": false,
"recoveryPointTierDetails": [
{
"type": "InstantRP",
"status": "Valid"
},
{
"type": "HardenedRP",
"status": "Valid"
}
],
"isManagedVirtualMachine": true,
"virtualMachineSize": "Standard_B2ms",
"originalStorageAccountOption": false,
"osType": "Windows",
"recoveryPointMoveReadinessInfo": {
"ArchivedRP": {
"isReadyForMove": false,
"additionalInfo": "Recovery point cannot be moved to Archive tier due to insufficient retention duration specified in policy.. Update policy on the protected item with appropriate retention setting and try again."
}
},
"isPrivateAccessEnabledOnAnyDisk": false
}
},
{
"id": "/subscriptions/bxxxxxxx-xxxx-4090-xxxx-xxxxxxxxxxx/resourceGroups/yyyxxxxxx01/providers/Microsoft.RecoveryServices/vaults/yyyxxxxxx01-rsv01/backupFabrics/Azure/protectionContainers/IaasVMContainer;iaasvmcontainerv2;yyyxxxxxx01;xxxxxx-adfs01/protectedItems/VM;iaasvmcontainerv2;yyyxxxxxx01;xxxxxx-adfs01/recoveryPoints/127210309092906",
"name": "127210309092906",
"type": "Microsoft.RecoveryServices/vaults/backupFabrics/protectionContainers/protectedItems/recoveryPoints",
"properties": {
"objectType": "IaasVMRecoveryPoint",
"recoveryPointType": "AppConsistent",
"recoveryPointTime": "2023-04-11T11:09:57.5199073Z",
"recoveryPointAdditionalInfo": "",
"sourceVMStorageType": "NormalStorage",
"isSourceVMEncrypted": false,
"isInstantIlrSessionActive": false,
"recoveryPointTierDetails": [
{
"type": "InstantRP",
"status": "Valid"
},
{
"type": "HardenedRP",
"status": "Valid"
}
],
"isManagedVirtualMachine": true,
"virtualMachineSize": "Standard_B2ms",
"originalStorageAccountOption": false,
"osType": "Windows",
"recoveryPointMoveReadinessInfo": {
"ArchivedRP": {
"isReadyForMove": false,
"additionalInfo": "Recovery point cannot be moved to Archive tier due to insufficient retention duration specified in policy.. Update policy on the protected item with appropriate retention setting and try again."
}
},
"isPrivateAccessEnabledOnAnyDisk": false
}
},
{
"id": "/subscriptions/bxxxxxxx-xxxx-4090-xxxx-xxxxxxxxxxx/resourceGroups/yyyxxxxxx01/providers/Microsoft.RecoveryServices/vaults/yyyxxxxxx01-rsv01/backupFabrics/Azure/protectionContainers/IaasVMContainer;iaasvmcontainerv2;yyyxxxxxx01;xxxxxx-adfs01/protectedItems/VM;iaasvmcontainerv2;yyyxxxxxx01;xxxxxx-adfs01/recoveryPoints/128030461959385",
"name": "128030461959385",
"type": "Microsoft.RecoveryServices/vaults/backupFabrics/protectionContainers/protectedItems/recoveryPoints",
"properties": {
"objectType": "IaasVMRecoveryPoint",
"recoveryPointType": "AppConsistent",
"recoveryPointTime": "2023-04-10T11:13:42.1997441Z",
"recoveryPointAdditionalInfo": "",
"sourceVMStorageType": "NormalStorage",
"isSourceVMEncrypted": false,
"isInstantIlrSessionActive": false,
"recoveryPointTierDetails": [
{
"type": "InstantRP",
"status": "Valid"
},
{
"type": "HardenedRP",
"status": "Valid"
}
],
"isManagedVirtualMachine": true,
"virtualMachineSize": "Standard_B2ms",
"originalStorageAccountOption": false,
"osType": "Windows",
"recoveryPointMoveReadinessInfo": {
"ArchivedRP": {
"isReadyForMove": false,
"additionalInfo": "Recovery point cannot be moved to Archive tier due to insufficient retention duration specified in policy.. Update policy on the protected item with appropriate retention setting and try again."
}
},
"recoveryPointProperties": {
"expiryTime": "2023-04-12T11:13:42.1997441",
"ruleName": "Daily",
"isSoftDeleted": false
},
"isPrivateAccessEnabledOnAnyDisk": false
}
},
{
"id": "/subscriptions/bxxxxxxx-xxxx-4090-xxxx-xxxxxxxxxxx/resourceGroups/yyyxxxxxx01/providers/Microsoft.RecoveryServices/vaults/yyyxxxxxx01-rsv01/backupFabrics/Azure/protectionContainers/IaasVMContainer;iaasvmcontainerv2;yyyxxxxxx01;xxxxxx-adfs01/protectedItems/VM;iaasvmcontainerv2;yyyxxxxxx01;xxxxxx-adfs01/recoveryPoints/128225584489836",
"name": "128225584489836",
"type": "Microsoft.RecoveryServices/vaults/backupFabrics/protectionContainers/protectedItems/recoveryPoints",
"properties": {
"objectType": "IaasVMRecoveryPoint",
"recoveryPointType": "AppConsistent",
"recoveryPointTime": "2023-04-09T11:14:09.165811Z",
"recoveryPointAdditionalInfo": "",
"sourceVMStorageType": "NormalStorage",
"isSourceVMEncrypted": false,
"isInstantIlrSessionActive": false,
"recoveryPointTierDetails": [
{
"type": "InstantRP",
"status": "Deleted"
},
{
"type": "HardenedRP",
"status": "Valid"
}
],
"isManagedVirtualMachine": true,
"virtualMachineSize": "Standard_B2ms",
"originalStorageAccountOption": false,
"osType": "Windows",
"recoveryPointMoveReadinessInfo": {
"ArchivedRP": {
"isReadyForMove": false,
"additionalInfo": "Recovery point cannot be moved to Archive tier due to insufficient retention duration specified in policy.. Update policy on the protected item with appropriate retention setting and try again."
}
},
"recoveryPointProperties": {
"expiryTime": "2023-05-14T11:14:09.165811",
"ruleName": "Weekly",
"isSoftDeleted": false
},
"isPrivateAccessEnabledOnAnyDisk": false
}
},
{
"id": "/subscriptions/bxxxxxxx-xxxx-4090-xxxx-xxxxxxxxxxx/resourceGroups/yyyxxxxxx01/providers/Microsoft.RecoveryServices/vaults/yyyxxxxxx01-rsv01/backupFabrics/Azure/protectionContainers/IaasVMContainer;iaasvmcontainerv2;yyyxxxxxx01;xxxxxx-adfs01/protectedItems/VM;iaasvmcontainerv2;yyyxxxxxx01;xxxxxx-adfs01/recoveryPoints/123760327780346",
"name": "123760327780346",
"type": "Microsoft.RecoveryServices/vaults/backupFabrics/protectionContainers/protectedItems/recoveryPoints",
"properties": {
"objectType": "IaasVMRecoveryPoint",
"recoveryPointType": "AppConsistent",
"recoveryPointTime": "2023-04-08T11:11:15.3797341Z",
"recoveryPointAdditionalInfo": "",
"sourceVMStorageType": "NormalStorage",
"isSourceVMEncrypted": false,
"isInstantIlrSessionActive": false,
"recoveryPointTierDetails": [
{
"type": "InstantRP",
"status": "Deleted"
},
{
"type": "HardenedRP",
"status": "Valid"
}
],
"isManagedVirtualMachine": true,
"virtualMachineSize": "Standard_B2ms",
"originalStorageAccountOption": false,
"osType": "Windows",
"recoveryPointMoveReadinessInfo": {
"ArchivedRP": {
"isReadyForMove": false,
"additionalInfo": "Recovery point cannot be moved to Archive tier due to insufficient retention duration specified in policy.. Update policy on the protected item with appropriate retention setting and try again."
}
},
"recoveryPointProperties": {
"expiryTime": "2023-04-15T11:11:15.3797341",
"ruleName": "Daily",
"isSoftDeleted": false
},
"isPrivateAccessEnabledOnAnyDisk": false
}
},
{
"id": "/subscriptions/bxxxxxxx-xxxx-4090-xxxx-xxxxxxxxxxx/resourceGroups/yyyxxxxxx01/providers/Microsoft.RecoveryServices/vaults/yyyxxxxxx01-rsv01/backupFabrics/Azure/protectionContainers/IaasVMContainer;iaasvmcontainerv2;yyyxxxxxx01;xxxxxx-adfs01/protectedItems/VM;iaasvmcontainerv2;yyyxxxxxx01;xxxxxx-adfs01/recoveryPoints/133553052084734",
"name": "133553052084734",
"type": "Microsoft.RecoveryServices/vaults/backupFabrics/protectionContainers/protectedItems/recoveryPoints",
"properties": {
"objectType": "IaasVMRecoveryPoint",
"recoveryPointType": "AppConsistent",
"recoveryPointTime": "2023-04-07T11:15:17.1985293Z",
"recoveryPointAdditionalInfo": "",
"sourceVMStorageType": "NormalStorage",
"isSourceVMEncrypted": false,
"isInstantIlrSessionActive": false,
"recoveryPointTierDetails": [
{
"type": "InstantRP",
"status": "Deleted"
},
{
"type": "HardenedRP",
"status": "Valid"
}
],
"isManagedVirtualMachine": true,
"virtualMachineSize": "Standard_B2ms",
"originalStorageAccountOption": false,
"osType": "Windows",
"recoveryPointMoveReadinessInfo": {
"ArchivedRP": {
"isReadyForMove": false,
"additionalInfo": "Recovery point cannot be moved to Archive tier due to insufficient retention duration specified in policy.. Update policy on the protected item with appropriate retention setting and try again."
}
},
"recoveryPointProperties": {
"expiryTime": "2023-04-14T11:15:17.1985293",
"ruleName": "Daily",
"isSoftDeleted": false
},
"isPrivateAccessEnabledOnAnyDisk": false
}
},
{
"id": "/subscriptions/bxxxxxxx-xxxx-4090-xxxx-xxxxxxxxxxx/resourceGroups/yyyxxxxxx01/providers/Microsoft.RecoveryServices/vaults/yyyxxxxxx01-rsv01/backupFabrics/Azure/protectionContainers/IaasVMContainer;iaasvmcontainerv2;yyyxxxxxx01;xxxxxx-adfs01/protectedItems/VM;iaasvmcontainerv2;yyyxxxxxx01;xxxxxx-adfs01/recoveryPoints/129766400052435",
"name": "129766400052435",
"type": "Microsoft.RecoveryServices/vaults/backupFabrics/protectionContainers/protectedItems/recoveryPoints",
"properties": {
"objectType": "IaasVMRecoveryPoint",
"recoveryPointType": "AppConsistent",
"recoveryPointTime": "2023-04-06T11:12:46.9641514Z",
"recoveryPointAdditionalInfo": "",
"sourceVMStorageType": "NormalStorage",
"isSourceVMEncrypted": false,
"isInstantIlrSessionActive": false,
"recoveryPointTierDetails": [
{
"type": "InstantRP",
"status": "Deleted"
},
{
"type": "HardenedRP",
"status": "Valid"
}
],
"isManagedVirtualMachine": true,
"virtualMachineSize": "Standard_B2ms",
"originalStorageAccountOption": false,
"osType": "Windows",
"recoveryPointMoveReadinessInfo": {
"ArchivedRP": {
"isReadyForMove": false,
"additionalInfo": "Recovery point cannot be moved to Archive tier due to insufficient retention duration specified in policy.. Update policy on the protected item with appropriate retention setting and try again."
}
},
"recoveryPointProperties": {
"expiryTime": "2023-04-13T11:12:46.9641514",
"ruleName": "Daily",
"isSoftDeleted": false
},
"isPrivateAccessEnabledOnAnyDisk": false
}
}
]
}
DEBUG: Caught exception, type: System.FormatException
DEBUG: 10:06:30 AM - [ConfigManager] Got [True] from [EnableDataCollection], Module = [], Cmdlet = [].
Get-AzRecoveryServicesBackupRecoveryPoint: String '05/14/2023 11:14:09' was not recognized as a valid DateTime.
DEBUG: 10:06:30 AM - [ConfigManager] Got nothing from [DisplayBreakingChangeWarning], Module = [], Cmdlet = []. Returning default value [True].
DEBUG: 10:06:30 AM - [ConfigManager] Got nothing from [DisplayRegionIdentified], Module = [], Cmdlet = []. Returning default value [True].
DEBUG: AzureQoSEvent: Module: Az.RecoveryServices:6.3.0; CommandName: Get-AzRecoveryServicesBackupRecoveryPoint; PSVersion: 7.3.3; IsSuccess: False; Duration: 00:00:00.6868054; Exception: String '05/14/2023 11:14:09' was not recognized as a valid DateTime.;
DEBUG: 10:06:31 AM - GetAzureRmRecoveryServicesBackupRecoveryPoint end processing.
PS C:\Repos\yyy\build>
Environment data
$PsversionTable
Name Value
---- -----
PSVersion 7.3.3
PSEdition Core
GitCommitId 7.3.3
OS Microsoft Windows 10.0.19044
Platform Win32NT
PSCompatibleVersions {1.0, 2.0, 3.0, 4.0…}
PSRemotingProtocolVersion 2.3
SerializationVersion 1.1.0.1
WSManStackVersion 3.0
Module versions
Get-module Az*
ModuleType Version PreRelease Name ExportedCommands
---------- ------- ---------- ---- ----------------
Script 2.12.1 Az.Accounts {Add-AzEnvironment, Clear-AzConfig, Clear-AzContext, Clear-AzDefault…}
Script 5.7.0 Az.Compute {Add-AzImageDataDisk, Add-AzVhd, Add-AzVMAdditionalUnattendContent, Add-AzVMDataDisk…}
Script 6.3.0 Az.RecoveryServices {Add-AzRecoveryServicesAsrReplicationProtectedItemDisk, Backup-AzRecoveryServicesBackupItem, Copy-AzRecoveryServicesVault, Disable-AzR…
Error output
Resolve-AzError
HistoryId: 31
Message : String '05/14/2023 11:14:09' was not recognized as a valid DateTime.
StackTrace : at System.DateTime.Parse(String s)
at Microsoft.Azure.Commands.RecoveryServices.Backup.Helpers.RecoveryPointConversions.GetPSAzureVMRecoveryPoint(RecoveryPointResource rp, ItemBase item)
at Microsoft.Azure.Commands.RecoveryServices.Backup.Helpers.RecoveryPointConversions.GetPSAzureRecoveryPoints(List`1 rpList, ItemBase item)
at Microsoft.Azure.Commands.RecoveryServices.Backup.Cmdlets.ProviderModel.AzureWorkloadProviderHelper.ListRecoveryPoints(Dictionary`2 ProviderData)
at Microsoft.Azure.Commands.RecoveryServices.Backup.Cmdlets.ProviderModel.IaasVmPsBackupProvider.ListRecoveryPoints()
at Microsoft.Azure.Commands.RecoveryServices.Backup.Cmdlets.GetAzureRmRecoveryServicesBackupRecoveryPoint.<ExecuteCmdlet>b__39_0()
at Microsoft.Azure.Commands.RecoveryServices.Backup.Cmdlets.RecoveryServicesBackupCmdletBase.ExecutionBlock(Action action, Boolean shouldProcess)
Exception : System.FormatException
InvocationInfo : {Get-AzRecoveryServicesBackupRecoveryPoint}
Line : Get-AzRecoveryServicesBackupRecoveryPoint -Item $BackupItem -StartDate $StartDate.ToUniversalTime() -EndDate $EndDate.ToUniversalTime() -VaultId $vault.ID
Position : At line:1 char:1
+ Get-AzRecoveryServicesBackupRecoveryPoint -Item $BackupItem -StartDat …
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
HistoryId : 31
Author: | nzalex1 |
---|---|
Assignees: | - |
Labels: |
|
Milestone: | - |
confirmed.
based on this code example:
get-azsubscription | where name -like '*somename*' |select-azsubscription
$vault = Get-AzRecoveryServicesVault$currvault = $vault | where Name -like '*blah*'
$BackupItemList = Get-AzRecoveryServicesBackupItem -vaultId $currvault.ID -BackupManagementType AzureVM -WorkloadType AzureVM
$BackupItem = $BackupItemList[0]
$rp = Get-AzRecoveryServicesBackupRecoveryPoint -VaultId $currvault.ID -Item $backupItem
in az 9.3.0:
$PSVersionTable
Name Value
---- -----
PSVersion 7.3.4
PSEdition Core
GitCommitId 7.3.4
OS Microsoft Windows 10.0.22621
Platform Win32NT
PSCompatibleVersions {1.0, 2.0, 3.0, 4.0…}
PSRemotingProtocolVersion 2.3
SerializationVersion 1.1.0.1
WSManStackVersion 3.0
(get-command Get-AzRecoveryServicesBackupRecoveryPoint).version
Major Minor Build Revision
----- ----- ----- --------
6 1 2 -1
$rp = Get-AzRecoveryServicesBackupRecoveryPoint -VaultId $currvault.ID -Item $backupItem
works fine
however, in az 9.6.0:
$psversiontable
Name Value
---- -----
PSVersion 5.1.22621.963
PSEdition Desktop
PSCompatibleVersions {1.0, 2.0, 3.0, 4.0...}
BuildVersion 10.0.22621.963
CLRVersion 4.0.30319.42000
WSManStackVersion 3.0
PSRemotingProtocolVersion 2.3
SerializationVersion 1.1.0.1
(get-command Get-AzRecoveryServicesBackupRecoveryPoint).version
Major Minor Build Revision
----- ----- ----- --------
6 3 0 -1
$rp = Get-AzRecoveryServicesBackupRecoveryPoint -VaultId $currvault.ID -Item $backupItem
Get-AzRecoveryServicesBackupRecoveryPoint : String was not recognized as a valid DateTime.
At line:1 char:7
+ $rp = Get-AzRecoveryServicesBackupRecoveryPoint -VaultId $currvault.I ...
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+ CategoryInfo : NotSpecified: (:) [Get-AzRecoveryS...upRecoveryPoint], FormatException
+ FullyQualifiedErrorId : Microsoft.Azure.Commands.RecoveryServices.Backup.Cmdlets.GetAzureRmRecoveryServicesBacku
pRecoveryPoint
@nzalex1 as stated above, as a workaround, try AZ 9.3.0, or more specific; az.RecoveryServices 6.1.2
Issue still persists in AZ v10.0.0
Tried az.recoveryservices 6.1.2 as suggested, still bugged. Also tried latest version, 6.4.0, still bugged.
@hiaga could you please check
@arbitmcdonald , @nzalex1 are you still facing this issue with Az.RecoveryServices/6.7.1 ?
closing this. Fixed in latest version 6.7.1