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-52618

Glenn Sullivan's questions

Martin Hope
Glenn Sullivan
Asked: 2020-05-22 07:24:42 +0800 CST

自动化 VMWare 配置备份

  • 1

我正在寻找一种方法来自动化我的 VMWare ESXi 配置的夜间备份以进行灾难恢复。

理想情况下,该脚本将连接到我的 vCenter 服务器,轮询主机,然后将配置备份到逻辑目录结构中,包括当前运行的 ESXi 版本,因为配置备份只能恢复到运行完全相同构建的机器上。

在某处有这样的脚本吗?

vmware-vcenter vmware-esxi powercli
  • 1 个回答
  • 107 Views
Martin Hope
Glenn Sullivan
Asked: 2019-08-20 05:52:12 +0800 CST

从“Notes”文件夹中恢复单个公用文件夹项目

  • 0

我的 Exchange 2016 服务器上有一个包含“Notes”类型项目的公用文件夹。一位用户无意中删除了其中一个笔记。

邮件类型文件夹在 Outlook 中具有“恢复已删除项目”的选项,但 Notes 类型文件夹没有。

有谁知道一个简单的方法来把这个项目从已删除的项目中拉出来?我开启了保留,我们在保留期内。

exchange-2016
  • 2 个回答
  • 51 Views
Martin Hope
Glenn Sullivan
Asked: 2018-10-21 18:13:24 +0800 CST

Powershell Invoke-Command 在手动运行时有效,但在脚本中无效

  • 1

我正在构建一个脚本来远程安装 PSWindowsUpdate PowerShell 模块,打开正确的防火墙端口,然后运行命令来安装等待更新。为了安装 PSWindowsUpdate 模块,我需要在我的一些机器上安装 MSI 以启用“Install-Module”命令行开关。

如果我在本地计算机上的管理员 PowerShell 会话中手动运行以下代码,它可以正常工作:

$RemoteMachine = "DCSvrRDS16"
write-host "Server Name is: $RemoteMachine"

#Copy the MSI Local to the computer
Write-Host "Copying MSI locally"
Copy "\\dcsvrstorage2\software\microsoft\powershell\PackageManagement_x64.msi" \\$RemoteMachine\c$\

#Run the MSI remotely
Write-Host "Running MSI"
Invoke-Command -ComputerName $RemoteMachine -Credential $domaincredentials -ScriptBlock { c:\windows\system32\msiexec /i c:\PackageManagement_x64.msi /quiet /lvx* c:\PackageManagement.log } 4>&1

但是,如果我在完全相同的已打开 PowerShell 会话中运行此完整脚本,则不会安装 MSI 并且不会创建日志文件:

Import-Module PSWindowsUpdate
$domaincredentials = Get-Credential


Function ProcessMachine($RemoteMachine) {

    write-host "Server Name is: $RemoteMachine"

    #Copy the MSI Local to the computer
    Write-Host "Copying MSI locally"
    Copy "\\dcsvrstorage2\software\microsoft\powershell\PackageManagement_x64.msi" \\$RemoteMachine\c$\

    #Run the MSI remotely
    Write-Host "Running MSI"
    Invoke-Command -ComputerName $RemoteMachine -Credential $domaincredentials -ScriptBlock { c:\windows\system32\msiexec /i c:\PackageManagement_x64.msi /quiet /lvx* c:\PackageManagement.log } 4>&1

    #Install the module
    Invoke-Command -ComputerName $RemoteMachine -Credential $domaincredentials -ScriptBlock { Install-Module PSWindowsUpdate -Force }

    #Turn on the firewall rules
    Invoke-Command -ComputerName $RemoteMachine -Credential $domaincredentials -ScriptBlock { Set-NetFirewallRule -DisplayName "COM+ Network Access (DCOM-In)" -Enabled True }
    Invoke-Command -ComputerName $RemoteMachine -Credential $domaincredentials -ScriptBlock { Set-NetFirewallRule -DisplayName "COM+ Remote Administration (DCOM-In)" -Enabled True }
    Invoke-Command -ComputerName $RemoteMachine -Credential $domaincredentials -ScriptBlock { Remove-NetFirewallRule -DisplayName "Remote WSUS Install" }
    Invoke-Command -ComputerName $RemoteMachine -Credential $domaincredentials -ScriptBlock { New-NetFirewallRule -DisplayName "Remote WSUS Install" -Profile Domain -Enabled True -Direction Inbound -Action Allow -Protocol TCP -LocalPort RPC }

    #Try the update
    Install-WindowsUpdate -ComputerName $RemoteMachine -AcceptAll
}

foreach ($machine in (Get-Content NeedsWSUS.txt)) {

    ProcessMachine $machine

}

这让我快疯了。我已经在远程机器上运行了 ProcessMonitor,我可以看到 msiexec 启动然后停止,而无需访问 C: 驱动器根目录中的 MSI 或尝试打开日志文件进行写入。

有没有人见过类似的东西?客户端机器是 Windows 7 pro、Powershell 4,目标机器是 Windows 2012 R2 和 PowerShell 4。

提前致谢。

powershell
  • 1 个回答
  • 5092 Views
Martin Hope
Glenn Sullivan
Asked: 2012-07-25 07:05:04 +0800 CST

Exchange 2010 OWA 停止仅适用于 Internet Explorer

  • 0

我有一台服务器 Exchange 2010 安装。

过去一周 Outlook Web Access 已三次停止工作,但仅限于 Internet Explorer 客户端。基于表单的身份验证登录页面加载,但无论输入什么凭据,它总是返回消息“您输入的用户名或密码不正确。请再次输入。”

在同一台客户端计算机上打开几乎任何其他 Web 浏览器并从那里尝试使用相同的凭据就可以了。

这告诉我 PREMIUM 客户端有问题,但是什么?

我过去所做的似乎已经解决了问题,但只是暂时的:

  1. 重新应用 SP2 更新汇总 4 并重新启动。
  2. 刚重启。
  3. 重新创建 OWA 虚拟目录并重新启动 IIS。

我不愿意在一天中现在重新启动服务器来尝试选项 1 或 2,但是这次选项 3 不起作用。

有什么建议么?我尝试了多个 IE 版本(7 到 9),结果相同。

exchange-2010
  • 1 个回答
  • 1325 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