powershell string to decimal

Jason Steeves 136 Reputation points
2021-09-28T18:35:03.803+00:00

I'm reading into a variable a value that is 10.4.2.19943.2 from the add/remove programs and this is a data type of String. I want to change this to a numerical value so that I can perform a Less Than comparison to determine if a piece of software needs to be installed or skipped.

How can I convert this variable from string to a numerical data string?

Windows Server PowerShell
Windows Server PowerShell
Windows Server: A family of Microsoft server operating systems that support enterprise-level management, data storage, applications, and communications.PowerShell: A family of Microsoft task automation and configuration management frameworks consisting of a command-line shell and associated scripting language.
5,574 questions
{count} votes

Accepted answer
  1. Jason Steeves 136 Reputation points
    2021-09-28T22:10:14.3+00:00

    thank you that was what I was looking for.

    0 comments No comments

0 additional answers

Sort by: Most helpful

Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.