Guide pratique pour activer Windows Remote Shell

Cet article vous aide à activer Windows Remote Shell.

Produit concerné : Windows Server 2003
Numéro de la base de connaissances d’origine : 555966

Cet article a été écrit par Yuval Sinay, MVP Microsoft.

Conseils

Pour activer Windows Remote Shell, vous devez déployer les paramètres côté serveur et côté client :

Côté serveur

Remarque

La définition de serveur dans l’article décrit un hôte Windows qui accède à l’interpréteur de commandes de gestion à distance.

  1. Connectez-vous à la console Windows.

  2. Facultatif (Pour Windows Vista sert de serveur distant) : démarrez le service « Gestion à distance Windows » et définissez-le pour le démarrage automatique après le redémarrage.

  3. Écrivez l’invite WinRM quickconfig de commandes et appuyez sur le bouton Entrée.

  4. La sortie suivante doit apparaître :

    WinRM is not set up to allow remote access to this machine for management.
    The following changes must be made:
    
    Set the WinRM service type to delayed auto start.
    Start the WinRM service.
    Create a WinRM listener on HTTP://* to accept WS-Man requests to any IP on this
    machine.
    
    Make these changes [y/n]? y
    
  5. Après avoir appuyé sur le bouton y , la sortie suivante doit s’afficher :

    WinRM has been updated for remote management.
    
    WinRM service type changed successfully.
    WinRM service started.
    Created a WinRM listener on HTTP://* to accept WS-Man requests to any IP on this machine.
    

    Remarque

    Nous vous recommandons de modifier les paramètres par défaut via la commande (Par exemple, activer la winrm.cmd prise en charge HTTPS, etc.).

    Windows Remote Shell à l’aide de SOAP. Certains pare-feu peuvent bloquer le trafic SOAP. Pour plus d’informations, consultez la documentation du fournisseur.

Côté client

Sur l’hôte Windows Vista/Windows 2008, utilisez la commande winrs -r:%servername% remote command et appuyez sur le bouton Entrée.

Exemple : Pour passer en revue le système de fichiers distant, écrivez la commande suivante :

winrs -r:DC1 dir

Remarque

Dans l’environnement Windows Workgroup, il est nécessaire d’ajouter une approbation pour le serveur que le client initie une connexion à celui-ci à l’aide de la commande winrm set winrm/config/client @{TrustedHosts="%servername1%,"%servername2%"}.

Vérifiez les nouveaux paramètres à l’aide de la commande winrm enumerate winrm/config/listener.

Exclusion de contenu communautaire Solutions

MICROSOFT CORPORATION ET/OU SES FOURNISSEURS RESPECTIFS NE FONT AUCUNE DÉCLARATION SUR LA PERTINENCE, DE FIABILITÉ OU L’EXACTITUDE DES INFORMATIONS ET DES ÉLÉMENTS GRAPHIQUES ASSOCIÉS CONTENUS DANS LE PRÉSENT DOCUMENT. TOUTES CES INFORMATIONS ET ÉLÉMENTS GRAPHIQUES ASSOCIÉS SONT FOURNIS « EN L’ÉTAT » SANS GARANTIE D’AUCUNE SORTE. MICROSOFT ET/OU SES FOURNISSEURS RESPECTIFS EXCLUENT TOUTES LES GARANTIES ET CONDITIONS RELATIVES À CES INFORMATIONS ET LES GRAPHIQUES ASSOCIÉS, NOTAMMENT TOUTE GARANTIE IMPLICITE DE QUALITÉ MARCHANDE, D’ADÉQUATION À UN USAGE PARTICULIER, LOIS ET D’ABSENCE DE CONTREFAÇON. VOUS RECONNAISSEZ SPÉCIFIQUEMENT QU’EN AUCUN CAS MICROSOFT ET/OU SES FOURNISSEURS EST RESPONSABLES POUR DES DOMMAGES DIRECTS, INDIRECTS, PUNITIFS, OU ACCESSOIRES, SPÉCIALES, NI LES DOMMAGES QUELCONQUES Y COMPRIS, SANS LIMITATION, LES DOMMAGES POUR PERTE D’UTILISATION, DE DONNÉES OU DE BÉNÉFICES, DÉCOULANT D’OU DANS N’IMPORTE QUEL LIÉS À L’UTILISATION D’OU DE L’INCAPACITÉ À UTILISER LES INFORMATIONS ET LES ÉLÉMENTS GRAPHIQUES ASSOCIÉS CONTENUS DANS LE PRÉSENT DOCUMENT , BASÉ SUR LE CONTRAT, RESPONSABILITÉ DÉLICTUELLE, NÉGLIGENCE, RESPONSABILITÉ STRICTE OU AUTREMENT, MÊME SI MICROSOFT OU L’UN DE SES FOURNISSEURS A ÉTÉ AVERTI DE L’ÉVENTUALITÉ DE DOMMAGES.