Como evitar o erro winrm, no meu script de descomissionamento. Gostaria de excluir sites remotamente

0

Erro recebido:

Connecting to remote server xxxxxx failed with the following error message : WinRM cannot process the request. The following error with errorcode 0x80090322 occurred while using Kerberos authentication: An unknown security error occurred.

Script usado:

[Void][Reflection.Assembly]::LoadWithPartialName("Microsoft.Web.Administration")

Import-Module WebAdministration

$Sm=Get-Content -path D:\script\sites.txt
write-host "list" $Sm 
$serverslist=get-content -path D:\script\servers.txt
foreach($server in $serverslist)
{
  write-host "currentserver" $server

  foreach($site in $sm)
  {
  Invoke-Command -ComputerName $server {Remove-Item -recurse "IIS:\Sites\$site"} 
}
}
    
por user919948 03.07.2018 / 16:46

0 respostas

Tags