小编pac*_*ace的帖子

获取$ webclient.downloadstring以写入Powershell中的文本文件

我不是程序员/脚本编写者.我只需要获取以下脚本来写入文件:

[CmdletBinding()]
param ()

# Create a web client object
$webClient = New-Object System.Net.WebClient


# Returns the public IP address
$webClient.DownloadString('http://myip.dnsomatic.com/')
Run Code Online (Sandbox Code Playgroud)

我已经尝试了out-file和export-csv,但它写了一个空白文件.我确信这很简单......但是没有知识对我来说很难.

powershell export file

6
推荐指数
2
解决办法
2万
查看次数

标签 统计

export ×1

file ×1

powershell ×1