In PowerShell, how do I evaluate a mathematical expression stored as a string? How do I get PowerShell to evaluate the following:
C:\> $a="30000/1001"
C:\> $a
30000/1000
C:\>
Desired output:
C:\> $a="30000/1001"
C:\> <some command>
29.97002997003
C:\>
In Linux I could do the following (and is basically what I want to accomplish in PowerShell):
user@computer:/path# a="30000/1001"
user@computer:/path# echo "scale=5; $a" | bc
29.97002