Giter Club home page Giter Club logo

Comments (8)

ryancbutler avatar ryancbutler commented on August 15, 2024

Thanks! Looks like an issue when the day is 1 number vs 2. December 1 vs December 22

from citrix.

ryancbutler avatar ryancbutler commented on August 15, 2024

Should be fixed. Had to adjust how the date was looked at with double digit days. Please try #12 when you get a chance.

from citrix.

tylerapplebaum avatar tylerapplebaum commented on August 15, 2024
Exception calling "ParseExact" with "3" argument(s): "String was not recognized as a valid DateTime."
At C:\users\applebaumt\Desktop\Get-NSLicense.ps1:217 char:1
+ $nsdate = [DateTime]::ParseExact($currentdatestr,"ddd MMM dd HH:mm:ss ...
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    + CategoryInfo          : NotSpecified: (:) [], MethodInvocationException
    + FullyQualifiedErrorId : FormatException

Current NS Time:

Same exact error this time.

from citrix.

ryancbutler avatar ryancbutler commented on August 15, 2024

Can you add the line above line 217 and run again? Need to know what your date string is coming across as. Tried with a bunch of different dates on my end.

write-host $currentdatestr

Should look like.

$currentdatestr = $currentdatestr -replace "  "," 0"
write-host $currentdatestr
$nsdate = [DateTime]::ParseExact($currentdatestr,"ddd MMM dd HH:mm:ss yyyy",$null)```

from citrix.

tylerapplebaum avatar tylerapplebaum commented on August 15, 2024

That variable is null. I'll keep debugging it and see what I can come up with.

from citrix.

tylerapplebaum avatar tylerapplebaum commented on August 15, 2024

Ah, part of the problem:

http://'my ns IP'/nitro/v1/config/systemfile?args=filelocation:%2Fnsconfig%2Flicense

{ "errorcode": 1232, "message": "Invalid object name [systemfile]", "severity": "ERROR" }

from citrix.

ryancbutler avatar ryancbutler commented on August 15, 2024

Ahhhh. Looks like file operations weren't added until 10.5.

from citrix.

ryancbutler avatar ryancbutler commented on August 15, 2024

Not much I can do here since file operations aren't available until 10.5. Added some error handling and a Netscaler function to throw error if anything lower than 10.5

from citrix.

Related Issues (6)

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.