AskOverflow.Dev

AskOverflow.Dev Logo AskOverflow.Dev Logo

AskOverflow.Dev Navigation

  • 主页
  • 系统&网络
  • Ubuntu
  • Unix
  • DBA
  • Computer
  • Coding
  • LangChain

Mobile menu

Close
  • 主页
  • 系统&网络
    • 最新
    • 热门
    • 标签
  • Ubuntu
    • 最新
    • 热门
    • 标签
  • Unix
    • 最新
    • 标签
  • DBA
    • 最新
    • 标签
  • Computer
    • 最新
    • 标签
  • Coding
    • 最新
    • 标签
主页 / user-342411

DisplayName's questions

Martin Hope
DisplayName
Asked: 2022-01-04 19:23:28 +0800 CST

IIS 负载平衡

  • 0

上周我们在负载均衡器下部署了 IIS 网站,并且使用 DFS 复制了 Web 托管路径。现在我看看如果我在服务器 1 中添加一个网站,我还需要在服务器 2 上添加它。有什么方法可以复制它,比如我们添加网站或更改绑定或其他任何东西,它也会反映在另一台服务器上?Azure 上的服务器 2019。

iis
  • 1 个回答
  • 37 Views
Martin Hope
DisplayName
Asked: 2016-07-01 18:23:25 +0800 CST

如果匹配powershell,比较两个项目

  • 0

我在文本文件中导出驱动器名称电影。

Get-WmiObject win32_logicaldisk| foreach-object {$volumename -Match "movies" } | select movies > c:\nn.txt

后来比较它但不成功总是得到错误的结果有人可以帮忙吗?

$test=Get-WmiObject win32_logicaldisk| foreach-object {$volumename -Match "movies" } | select movies > c:\nn.txt
    $array =get-content c:\nn.txt
    $real= Get-WmiObject win32_logicaldisk| foreach-object {$volumename -Match "movies"} | select movies
    If ($array -eq $real)

    {write-host "it was success" -foregroundcolor blue}
    Else {write-host "it was fail" -foregroundcolor green}
powershell
  • 1 个回答
  • 73 Views
Martin Hope
DisplayName
Asked: 2016-03-11 10:50:34 +0800 CST

如果服务停止发送电子邮件通知

  • 0

使用此脚本以在 1 个或多个服务未运行时获取电子邮件通知。

这里出了点问题,它发送: System.ServiceProcess.ServiceController 正在运行

 $service=Get-Service "VSS"
    if ($Service.Status -ne "Running") {
    $Body ="$service is not running"
    }
    else {
      $Body = "$service is running "
    }

    $From = "email"
    $To = "emails"
    $SMTPServer = "smtp"
    $SMTPPort = "587"
    $Username = "email"
    $Password = "password"
    $Body =$body
    $Subject = "$computer$ status"
    $smtp = New-Object System.Net.Mail.SmtpClient($SMTPServer, $SMTPPort);
    $smtp.EnableSSL = $false
    $smtp.Credentials = New-Object System.Net.NetworkCredential($Username, $Password);
    $smtp.Send($From, $To, $subject, $body); 
    $computer = $env:computername
powershell
  • 1 个回答
  • 7255 Views

Sidebar

Stats

  • 问题 205573
  • 回答 270741
  • 最佳答案 135370
  • 用户 68524
  • 热门
  • 回答
  • Marko Smith

    新安装后 postgres 的默认超级用户用户名/密码是什么?

    • 5 个回答
  • Marko Smith

    SFTP 使用什么端口?

    • 6 个回答
  • Marko Smith

    命令行列出 Windows Active Directory 组中的用户?

    • 9 个回答
  • Marko Smith

    什么是 Pem 文件,它与其他 OpenSSL 生成的密钥文件格式有何不同?

    • 3 个回答
  • Marko Smith

    如何确定bash变量是否为空?

    • 15 个回答
  • Martin Hope
    Tom Feiner 如何按大小对 du -h 输出进行排序 2009-02-26 05:42:42 +0800 CST
  • Martin Hope
    Noah Goodrich 什么是 Pem 文件,它与其他 OpenSSL 生成的密钥文件格式有何不同? 2009-05-19 18:24:42 +0800 CST
  • Martin Hope
    Brent 如何确定bash变量是否为空? 2009-05-13 09:54:48 +0800 CST
  • Martin Hope
    cletus 您如何找到在 Windows 中打开文件的进程? 2009-05-01 16:47:16 +0800 CST

热门标签

linux nginx windows networking ubuntu domain-name-system amazon-web-services active-directory apache-2.4 ssh

Explore

  • 主页
  • 问题
    • 最新
    • 热门
  • 标签
  • 帮助

Footer

AskOverflow.Dev

关于我们

  • 关于我们
  • 联系我们

Legal Stuff

  • Privacy Policy

Language

  • Pt
  • Server
  • Unix

© 2023 AskOverflow.DEV All Rights Reserve