PowerShell tips: evaluate arithmetic expressions and powershell

Source: Internet
Author: User

PowerShell tips: evaluate arithmetic expressions and powershell

The hard disk capacity used by a group of virtual machines is counted a few days ago. You only want to get an approximate value. The calculated value is as follows:

For arithmetic expressions: 60*3 + 80*2 + 90*3 + 120*6 + 140*2 + 150*3 + 160*5 + 200*2 + 240

At that time, it was calculated using a calculator provided by windows, which was prone to errors. You should pay attention to the brackets. don't worry too much about the troubles, you just found that the Powershell command line can automatically calculate the expression value. You just need to manually input the expression or paste it:

If you enter an error, You can manually modify it. After you finish the modification, press enter to get the result immediately.

Since then, simple arithmetic operations no longer require a calculator, and Powershell can be used to get results immediately.
 

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.