Git Product home page Git Product logo

Comments (10)

Nicholak-MS avatar Nicholak-MS commented on July 25, 2024

Hi @mprentice22153 not sure what is causing that to encode incorrectly. I republished another another version. Can you see if you are still hitting the issue? If so I will have to investigate further.

Thanks
Nick

from entra-docs.

mprentice22153 avatar mprentice22153 commented on July 25, 2024

@Nicholak-MS Still getting the same problem. I'm not seeing the issue in the downloaded CSV when I get it direct from the website via a web browser. Interesting that it is the first field in the CSV.

Apologies for saying it has been happening for a couple weeks. I thought it was happening before I started my vacation in April but I can't find evidence. I've definitely been seeing it this week.

Not sure where the issue is currently

from entra-docs.

TPavanBalaji avatar TPavanBalaji commented on July 25, 2024

@mprentice22153
Thanks for your feedback! We will investigate and update as appropriate.

from entra-docs.

mprentice22153 avatar mprentice22153 commented on July 25, 2024

I have not rebooted my system for almost a month but will soon and can test, just in case something is whacky.

When I download the CSV via a browser and save it, this works fine:

$temp = Import-Csv 'C:\Downloads\Product names and service plan identifiers for licensing.csv'
$temp | gm


   TypeName: System.Management.Automation.PSCustomObject

Name                                  MemberType   Definition
----                                  ----------   ----------
Equals                                Method       bool Equals(System.Object obj)
GetHashCode                           Method       int GetHashCode()
GetType                               Method       type GetType()
ToString                              Method       string ToString()
GUID                                  NoteProperty string GUID=c2e41e49-e2a2-4c55-832a-cf13ffba1d6a
Product_Display_Name                  NoteProperty string Product_Display_Name=10-Year Audit Log Retention Add On
Service_Plans_Included_Friendly_Names NoteProperty string Service_Plans_Included_Friendly_Names=Auditing 10Year Retention Add On
Service_Plan_Id                       NoteProperty string Service_Plan_Id=7d16094b-4db8-41ff-a182-372a90a85407
Service_Plan_Name                     NoteProperty string Service_Plan_Name=Auditing_10Year_ Retention_ Add_On
String_Id                             NoteProperty string String_Id=10_ALR_ADDON

from entra-docs.

Nicholak-MS avatar Nicholak-MS commented on July 25, 2024

Thanks @mprentice22153 for the testing assistance here from your side. I am able to confirm downloading from the site works as well. I haven't tried via PS. But curious to hear if rebooting helps your side. If not I will do a little reconfig on my side to see if we can get it working again.

Thanks
Nick

from entra-docs.

Naveenommi-MSFT avatar Naveenommi-MSFT commented on July 25, 2024

@Nicholak-MS
Thanks for your response.

@mprentice22153
We are going to close this thread, if there are any further questions regarding the documentation, please tag me in your reply and we will be happy to continue the conversation.
#Please-close

from entra-docs.

mprentice22153 avatar mprentice22153 commented on July 25, 2024

@Nicholak-MS @Naveenommi-MSFT

This ticket should not have been closed. I have rebooted my system and confirmed I'm still seeing the 3 question marks. I've built a workaround into my function but I really shouldn't need to.

Function Get-M365ProductList {

    $MicrosoftFileLocation = 'https://download.microsoft.com/download/e/3/e/e3e9faf2-f28b-490a-9ada-c6089a1fc5b0/Product%20names%20and%20service%20plan%20identifiers%20for%20licensing.csv'

    write-output 'Downloading current product list from Microsoft website'
    try {
        $M365Products = convertFrom-CSV (Invoke-WebRequest -Uri $MicrosoftFileLocation -ErrorAction stop).tostring()
    } catch {
        $M365Products = $null
    }

    # Corrections to the file
    If ($M365Products) {
        # The CSV currently has/had "String_ Id" with a space!!!!
#        $M365Products | add-member -MemberType AliasProperty -Name 'String_Id' -Value 'String_ Id' -erroraction silentlycontinue
        $M365Products | add-member -MemberType AliasProperty -Name 'Product_Display_Name' -Value '???Product_Display_Name' -erroraction silentlycontinue
    }    

    Return $M365Products
}

$prods = Get-M365ProductList

$prods | gm



   TypeName: System.Management.Automation.PSCustomObject

Name                                  MemberType    Definition
----                                  ----------    ----------
Product_Display_Name                  AliasProperty Product_Display_Name = ???Product_Display_Name
Equals                                Method        bool Equals(System.Object obj)
GetHashCode                           Method        int GetHashCode()
GetType                               Method        type GetType()
ToString                              Method        string ToString()
???Product_Display_Name               NoteProperty  string ???Product_Display_Name=10-Year Audit Log Retention Add On
GUID                                  NoteProperty  string GUID=c2e41e49-e2a2-4c55-832a-cf13ffba1d6a
Service_Plans_Included_Friendly_Names NoteProperty  string Service_Plans_Included_Friendly_Names=Auditing 10Year Retention Add On
Service_Plan_Id                       NoteProperty  string Service_Plan_Id=7d16094b-4db8-41ff-a182-372a90a85407
Service_Plan_Name                     NoteProperty  string Service_Plan_Name=Auditing_10Year_ Retention_ Add_On
String_Id                             NoteProperty  string String_Id=10_ALR_ADDON


from entra-docs.

Nicholak-MS avatar Nicholak-MS commented on July 25, 2024

Hi @mprentice22153 I have taken down the CSV and rebuilt from an entirely new csv file and made it available to download. Curious if this solves the encoding issue you are running in to. Can you please run a test?

Thanks,
Nick

from entra-docs.

mprentice22153 avatar mprentice22153 commented on July 25, 2024

@Nicholak-MS
So weird. I just tested this morning and I'm getting the same results. Do you see the same issue when you run my code from above? Wondering now if this is a PowerShell version/module issue.

My workaround works and my scripts are working again but odd that this is happening. I guess you'll just have to turn it into an API request and forego the CSV. ;-)

$psversiontable

Name                           Value
----                           -----
PSVersion                      5.1.19041.4291
PSEdition                      Desktop
PSCompatibleVersions           {1.0, 2.0, 3.0, 4.0...}
BuildVersion                   10.0.19041.4291
CLRVersion                     4.0.30319.42000
WSManStackVersion              3.0
PSRemotingProtocolVersion      2.3
SerializationVersion           1.1.0.1

from entra-docs.

Nicholak-MS avatar Nicholak-MS commented on July 25, 2024

Hi @mprentice22153 , can you help me to test a theory please? I think I traced the timing of the start of this issue back to a new row that was added that starts with digits, it is the only row of its kind... So I removed the row temporarily to see if that is the root of the issue. Could you try your original PS code and see if that removes the "???". Thanks!

from entra-docs.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.