使用Powershell检查远程服务器上的IIS logFile.period
我需要检查大约100台服务器的IIS日志设置。我正在运行PS 5,我发现这为我提供了本地服务器的设置:使用Powershell检查远程服务器上的IIS logFile.period,powershell,iis,logging,Powershell,Iis,Logging,我需要检查大约100台服务器的IIS日志设置。我正在运行PS 5,我发现这为我提供了本地服务器的设置: Import-Module WebAdministration Get-ChildItem IIS:\Sites Get-ItemProperty 'IIS:\Sites\Default Web Site' -Name logFile.period 要在远程服务器上运行相同的东西,我需要做什么?PSRemoting是您要问的问题 这是一个有很好文档记录(使用GUI和PowerShell)
Import-Module WebAdministration
Get-ChildItem IIS:\Sites
Get-ItemProperty 'IIS:\Sites\Default Web Site' -Name logFile.period
要在远程服务器上运行相同的东西,我需要做什么?PSRemoting是您要问的问题 这是一个有很好文档记录(使用GUI和PowerShell)的东西,文章和示例代码遍布web 在本地和远程计算机上运行命令
invoke-command -ComputerName 'IIS' -ScriptBlock {
Import-Module WebAdministration
Get-ChildItem IIS:\Sites
Get-ItemProperty 'IIS:\Sites\Default Web Site' -Name logFile.period
}
如何远程检索IIS HTTP日志
通过powershell获取IIS日志位置?