Comments (11)
Hello!
I cannot reproduce this even if I change my date/time format.
createdDateTime, lastModifiedDateTime and modifiedDateTime should be stored in the "2021-08-10T04:42:10.4104838Z" format. I cannot find any object that stores it in '02/15/2022 01:50:53' format as the error states.
How does it look in the detail view? Can you attach the policy that you are trying to document?
Cheers!
from intunemanagement.
I was able to replicate this in a Windows Sandbox using the following:
- Get current culture information (sandbox returned en-US for me)
Get-Culture
#LCID Name DisplayName
#---- ---- -----------
#1033 en-US English (United States)
- Set culture info to en-NZ (any country with dd/mm/yyyy date format will work)
Set-Culture -CultureInfo en-NZ
- Restart powershell
- Run .\Start-IntuneManagement.ps1 -ShowConsoleWindow
- Document attached json or any config with day created/lastmodified on the 13th or above and check console for Parse errors
I was able to work around the issue with ([DateTime]::Parse(([datetime]$obj.createdDateTime).ToString((get-culture))))
Hope this helps replicate the issue.
Thanks
from intunemanagement.
I cannot reproduce it no matter what I do.
Can you try this file
Documentation.zip
?
from intunemanagement.
Similar errors in the console:
Loading Prod_iOS_Compliance
Get documentation info for Prod_iOS_Compliance (Compliance Policies)
WARNING: Failed to parse date from string 02/15/2022 03:51:28
WARNING: Failed to parse date from string 02/15/2022 03:51:28
Resulting documents now contain Created and Last modified date/time in the format mm/dd/yyyy hh:mm:ss
from intunemanagement.
That is with the updated psm1. I did a try/catch statement and logged if it failed to parse. I still can understand why the date/time format is completely different from what I get from Graph. Unless something has changed or is different based on where the tenant is.
I found this link where it suggests that it might be a bug somewhere. In .NET?
microsoftgraph/msgraph-sdk-dotnet#79
from intunemanagement.
Can you try this and let me know what it says in the log. Just some more logging
Cheers!
from intunemanagement.
Where is the tenant? In the past I've seen different issues depending on where the tenant is. We're a bit different down under ;-)
from intunemanagement.
My tenant us in Australia. I live in Sydney and I do know things are a bit different here :). I used to live in Sweden so I know regional settings can be a big issue. Date conversations has been a problem for a long time.
I still can"t figure out why it returns a different date format for you. I wonder where that happens. If use the same query in Graph Explorer, what do you get then?
from intunemanagement.
Hello!
Looks like this is a PowerShell 6+ issue.
Try starting the script with PowerShell 5 eg add -version 5 to the command line.
from intunemanagement.
Try the new version. It uses -version 5 in the cmd files. Which should force it back to version 5 behaviour.
Let me know how it goes
from intunemanagement.
Closing this. This happens when using PowerShell 6+. Cmd files will always user PowerShell 5.
Cheers!
from intunemanagement.
Related Issues (20)
- No support for unicode encoding HOT 4
- Policies for Office Apps Missing HOT 1
- Request: Add group functionality HOT 1
- Feature Request: Filter by Platform HOT 2
- Compare Intune tenants HOT 7
- Groups and filter HOT 11
- Error 0x87d1fde8 with the Reg Value. HOT 3
- Unable to load anything HOT 2
- Not importing some setting catalog policies HOT 2
- Downloading File not working HOT 8
- Newest Security Baseline for Windows 10 not showing HOT 1
- Wait for state CommitFile HOT 1
- Ability to use passkey when authenticating HOT 1
- cannot load information anymore HOT 3
- File upload fails during application import HOT 2
- Unable to log in HOT 8
- "Microsoft Intune PowerShell" is being decommissioned HOT 1
- Application export copies only json file HOT 3
- Unable to login with Google SSO linked account HOT 1
- Issue: Unable to Connect Custom App & Defaulting to Microsoft Graph Command Line Tools HOT 4
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from intunemanagement.