1 2 Previous Next 17 Replies Latest reply on Sep 13, 2019 9:36 AM by LucD Go to original post
      • 15. Re: Finding Lun details using powercli
        LucD Guru
        Community WarriorsvExpertUser Moderators

        Yes, that is why we see the 129 error.

        It takes that name,splits on the dot and takes the first qualifier, which is obviously 129.

         

        Try the attached, slightly adapted version.

        Also note that the machine where you run this needs .Net 3.5 to be installed (due to the Add-Type the script is using).

        • 16. Re: Finding Lun details using powercli
          bigjohn1989 Lurker

          Hey LuCD,

           

          The script is failing due to my hosts have a - in the name.

           

          Add-Type -Language CsharpVersion3 -TypeDefinition $LunInfoDef

           

          Its failing when it tries to run the add-type command. it doesnt like a - in the type definition. is there away around this issue?

           

          PS C:\git> Add-Type -Language CsharpVersion3 -TypeDefinition $LunInfoDef

          Add-Type : c:\Users\AppData\Local\Temp\1\bp1zm0ly.0.cs(6) : Invalid token '-' in class, struct, or interface member declaration

          c:\Users\AppData\Local\Temp\1\bp1zm0ly.0.cs(5) : public string SizeMB;

          c:\Users\AppData\Local\Temp\1\bp1zm0ly.0.cs(6) : >>>  public string****-****;

          c:\Users\AppData\Local\Temp\1\bp1zm0ly.0.cs(7) :      public string*****-****;

          At line:1 char:1

          + Add-Type -Language CsharpVersion3 -TypeDefinition $LunInfoDef -Ignore ...

          + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

              + CategoryInfo          : InvalidData: (Microsoft.Power...peCompilerError:AddTypeCompilerError) [Add-Type], Exception

              + FullyQualifiedErrorId : SOURCE_CODE_ERROR,Microsoft.PowerShell.Commands.AddTypeCommand

          • 17. Re: Finding Lun details using powercli
            LucD Guru
            Community WarriorsvExpertUser Moderators

            In the comments of my LUN Report – Datastore, RDM And Node Visibility post, there are a couple of solutions for that issue.

            1 2 Previous Next