我有一个powershell脚本,它运行mysql查询,并将输出导出到.csv文件。
然后,它导入它,将它发送到一个$body变量并发送电子邮件。
这是代码
### Script to write body of e-mail to $body variable ###
$body = @"
CHECK 4A - MONTH DATABASE REPORT
Row count should be between 3-4k, but less on a Monday.
"@ + (Import-CSV C:\Users\*****\Documents\Reports\r
我正在使用一个脚本调用另一个脚本,我想将这两个脚本结合起来。我正在创建一个GUI来容纳一些工具,我将使用这些工具来帮助我学习PS。我买了PowerShell工作室,在命令行中得到了我想要的工作方式,但现在我想要图形用户界面部分。我不喜欢我用一个脚本去调用另一个脚本。
$form1_Load={
#TODO: Initialize Form Controls here
}
$buttonGetInventory_Click= {
#TODO: Place custom script here
$scriptlocation = "C:\temp\System_Inventory\Sys
我将此代码https://community.idera.com/database-tools/powershell/powertips/b/tips/posts/creating-powershell-web-server复制并粘贴到包含index.html文件的powershell控制台目录中 当浏览到http://localhost:8080/index.html时,我得到一个错误: Oops,页面不可用!代码有问题吗?我看不到什么? # enter this URL to reach PowerShell’s web server
$url = 'http://loc