Forum Discussion

Rambo363636's avatar
Rambo363636
Brass Contributor
Aug 22, 2024

Re: Powershell error with the below code

Hi Oliwer,

Thank you.

I ran below. I am using powershell ISE

PS C:\windows\System32> $keyVaultName = "marketing-test"
$data = Import-Csv "C:\Users\Ram.Muppaneni\Downloads\marketing.csv"
$data.value

PS C:\windows\System32>

Above was the output.

No data uploaded to the keyvault

Regards,
Rambo

10 Replies

  • oliwer_sundgren's avatar
    oliwer_sundgren
    Steel Contributor
    Hello Rambo. Since $Data.Value didnt give any output then the Value Column in your csv is not formatet correct.

    If you do the same but instead of running $Data.value could you run just $Data and see what the output is like?

    Cheers
    Oliwer
    • Rambo363636's avatar
      Rambo363636
      Brass Contributor

      oliwer_sundgren 
      Hi Oliwer,

      I got the below output.

      But it did not upload the data to key vault.

      Looking forward to hear from you. Thank you.

      Regards,
      Rambo


       

      • oliwer_sundgren's avatar
        oliwer_sundgren
        Steel Contributor
        Hmm the data does look correct.
        Could you try and run the script again and share a screenshot of error message again?.
        After the script has ran, run $Row.Name in the terminal and see if it outputs something as well

        Cheers
        Oliwer