Question Accès refusé avec Invoke-command

Plus d'informations
il y a 9 ans 9 mois #21985 par Arnaud Petitjean
Hello !

Je n'ai encore jamais utilisé l'option EnableNetworkAccess, d'ailleurs je ne connaissais pas. C'est nouveau ? :huh:

Arnaud

MVP PowerShell et créateur de ce magnifique forum :-)
Auteur de 6 livres PowerShell aux éditions ENI
Fondateur de la société Start-Scripting
Besoin d'une formation PowerShell ?

Connexion ou Créer un compte pour participer à la conversation.

Plus d'informations
il y a 9 ans 9 mois #21988 par Philippe

Je n'ai encore jamais utilisé l'option EnableNetworkAccess, d'ailleurs je ne connaissais pas. C'est nouveau

je l'avais testé pour un besoin ponctuel y a un ou deux ans en PSv3 mais plus depuis
ça marchais bien mais aujourd'hui j'arrive plus a le réutilisé ??? ni le credSSP
faut que je retest tranquillement win7 et win10 c'est peut etre win10 qui coince !

extrait de la doc de Invoke-Command et de New-PSSession :

-EnableNetworkAccess


Adds an interactive security token to loopback sessions. The interactive token lets you run commands in the loopback session that get data from other computers. For example, you can run a command in the session that copies XML files from a remote computer to the local computer.

A \"loopback session\" is a PSSession that originates and terminates on the same computer. To create a loopback session, omit the ComputerName parameter or set its value to \".\", \"localhost\", or the name of the local computer.

By default, loopback sessions are created with a network token, which might not provide sufficient permission to authenticate to remote computers.

The EnableNetworkAccess parameter is effective only in loopback sessions. If you use the EnableNetworkAccess parameter when creating a session on a remote computer, the command succeeds, but the parameter is ignored.

You can also allow remote access in a loopback session by using the CredSSP value of the Authentication parameter, which delegates the session credentials to other computers.

To protect the computer from malicious access, disconnected loopback sessions that have interactive tokens (those created with the EnableNetworkAccess parameter) can be reconnected only from the computer on which the session was created. Disconnected sessions that use CredSSP authentication can be reconnected from other computers. For more information, see Disconnect-PSSession.

Ce paramètre est introduit dans Windows PowerShell 3.0.

Connexion ou Créer un compte pour participer à la conversation.

Plus d'informations
il y a 9 ans 9 mois #21991 par Arnaud Petitjean
Hello !

C'est cool, on en apprends tous les jours :woohoo: !

Bon, de ce que je comprends, ce commutateur permet uniquement d'utiliser les chemins UNC en local (loopback). Donc dans le cas de notre ami, il lui faudra impérativement passer par de la délégation de credentials (CredSSP).

Je ne m'en suis pas servi très souvent mais ça a toujours bien fonctionné pour moi. Après j'ai pas testé avec Windows 10... :whistle:

Arnaud

MVP PowerShell et créateur de ce magnifique forum :-)
Auteur de 6 livres PowerShell aux éditions ENI
Fondateur de la société Start-Scripting
Besoin d'une formation PowerShell ?

Connexion ou Créer un compte pour participer à la conversation.

Plus d'informations
il y a 9 ans 9 mois #21997 par Philippe
Arnaud écrit:

Bon, de ce que je comprends, ce commutateur permet uniquement d'utiliser les chemins UNC en local (loopback).

correct, c'est donc pas la solution, ni la méthode que j'ai utilisé il y a quelques années :whistle:

mais je vois pas comment j'avais fais :unsure:

Connexion ou Créer un compte pour participer à la conversation.

Temps de génération de la page : 0.090 secondes
Propulsé par Kunena