Win10 preview version 14915 how to use PowerShell calculator to calculate data?

  

Windows 10 system built-in PowerShell function, PowerShell is also a smart calculator, it can perform four arithmetic operations according to the rules of mathematical expressions and can identify the computer capacity unit. The following describes the use of the built-in PowerShell smart calculator in Windows 10 system, for your reference.

First, open Windows PowerShell

1, right click on the blank space of the taskbar - Settings;

2. In the personalized settings window that opens, click: [When I right-click the "Start" button or press the Windows button +X, replace the command prompt with Windows PowerShell in the menu;

3, click [ When I right-click the "Start" button or press the Windows button +X, replace the command prompt with the Windows PowerShell switch in the menu to make it in the [On] position;

4. Right-click the “Start” button or press the Windows button +X to replace the command prompt in the menu with Windows PowerShell (Administrator);

5. Click on Windows PowerShell to open the Windows PowerShell window.

Second, use the Windows PowerShell smart calculator function to perform four arithmetic operations according to the rules of mathematical expressions

Note:

(1) PowerShell does not recognize Chinese braces “()”, can only recognize English brackets & ldquo; () & rdquo;;

(2) PowerShell for the number and the bracket between the brackets ellipsis rule can not be recognized, so the multi-digit number & ldquo; * & rdquo Cannot be omitted. Such as: 5 (7.81-3.14), must be: 5 * (7.81-3.14);

(3) PowerShell does not recognize other units outside the computer capacity unit.

1, now let's calculate 3.14*2.5+5(1-2/5), enter 3.14*2.5+5*(1-2/5) in the Windows PowerShell window, press Enter, and calculate the result. For: 10.85, completely correct.

2, if we enter: 3.14*2.5+5 (1-2/5), we can't calculate the result, the problem is that there is no <* between 5 and (1-2/5) ”号;

3, PowerShell can not identify other units outside the computer capacity unit, such as we input 3.14 * 2.5m * 2.5m, can not calculate the results;

< The calculation of p>4, 3.14*2.5m*2.5m should be the area of ​​a circle with a radius of 2.5m. We can only input: 3.14*2.5*2.5, and the carriage return: 19.625, the unit is: square meter.

5, we only need to remember the above three points, you can perform four operations in the Windows PowerShell window according to the rules of mathematical expressions. Such as operation: 1 + 2 x 3 - 4 & divide; 5 (5.86 - 9.71), input: 1 + 2 * 3 - 4 /5 * (5.86 - 9.71), enter, the calculation result is: 10.08, completely correct.

6. About PowerShell to identify computer capacity units: TB, GB, MB, KB, and B and their calculations. PowerShell recognizes a variety of computer capacity units and can be calculated in units.

Note:

(1) If the unit in the operation cannot be offset, it is calculated according to the minimum unit <;B” (PowerShell operation results do not display units);

(2) If the minimum unit “B” is involved in the operation, then no unit is required and it is directly represented by a number.

7, if it is: 1TB-250GB, the calculation result is: 831076171776, the unit is: B, will be 831076171776/1024/1024/1024, the result is: 774, unit: GB (1TB=1024GB, 1GB= 1024MB, 1MB=1024KB, 1KB=1024B), 774GB+250GB=1024GB=1TB.

8. If it is: 100MB-600B, we input: 100MB-600, enter, the result is: 104857000, unit: B.

The above is the use of Windows10 system PowerShell calculator for friends to refer to.

Related recommendation:

How to add a PowerShell script to the Win10 right-click menu?

Copyright © Windows knowledge All Rights Reserved