小编Mis*_*Iks的帖子

Powershell 脚本输出到变量 - 捕获 Write-Host 输出

使用此脚本: https: //github.com/byterogues/powershell-bittrex-api ,我从另一个脚本调用它。

例如

$order = .\bittrex-api.ps1 -action buylimit -market BTC-TX -quantity 1 -rate 0.00011300
Run Code Online (Sandbox Code Playgroud)

bittrex-api.ps1 捕获错误并将其显示在屏幕上

BITTREX 错误:API 查询返回错误。错误消息:MIN_TRADE_REQUIREMENT_NOT_MET

如何将 bittrex-api.ps1 的输出捕获到变量中,以便我可以在基本脚本中使用该变量?

powershell io-redirection

4
推荐指数
1
解决办法
7700
查看次数

Calculate result based on percentage in Powershell

I want to calculate the following in Powershell

$x = 100
$y = 25
result = x * y%
Run Code Online (Sandbox Code Playgroud)

Should be really simple, but I can't seem to come up with the right way to calculate the correct result in Powershell

powershell

2
推荐指数
1
解决办法
3373
查看次数

标签 统计

powershell ×2

io-redirection ×1