Vous ne savez pas quel est le problème? J'utilise Powershell 2.0 sur Windows 7. Si ce même script fonctionnait sous Windows XP, est-ce que je manque quelque chose?Redémarrer le pool d'applications IIS6 - Erreur ADSI
$server = "server1-vm1.prod.ds.russell.com"
$name = "Superduper_Reports"
$iis = [ADSI]"IIS://$server/W3SVC/AppPools/$name"
$iis.psbase.invoke("recycle")
Erreur (qui Invoke semble correct pour moi?):
Exception calling "Invoke" with "2" argument(s): "Unknown error (0x80005000)"
At line:3 char:19
+ $iis.psbase.invoke <<<< ("recycle")
+ CategoryInfo : NotSpecified: (:) [], MethodInvocationException
+ FullyQualifiedErrorId : DotNetMethodException
Lorsque vient courir $iis
variable i obtenir cette erreur:
The following exception occurred while retrieving member "PSComputerName": "Unknown error (0x80005000)"
+ CategoryInfo : NotSpecified: (:) [format-default], ExtendedTypeSystemException
+ FullyQualifiedErrorId : CatchFromBaseGetMember,Microsoft.PowerShell.Commands.FormatDefaultCommand
Roooarr! Je préfère utiliser ADSI sur WMI! De l'aide? :)
Merci! Pourriez-vous corriger la faute de frappe dans votre extrait? ajoutez le d à Get-ChildItem IIS: –