Erreure Powershell invoke-command
Bonjour à tous, j'ai fais un script de déploiement silencieux utilisant winrm, je ne parviens pas à diagnostiquer un message d'erreure, saurriez-vous me donner une piste ?
Code:
1 2 3 4 5 6
|
Invoke-Command -Computername PROD-27 -ScriptBlock {
#Install
$a = Start-process "C:\windows\temp\soft1.exe" -argumentlist "/q", "/i" -Wait
$b = Start-process "C:\windows\temp\soft2.msi" -argumentlist "/qn" -Wait
} |
Code:
1 2 3 4
| Impossible dexécuter cette commande en raison de lerreur*: Échec de lexécution du serveur.
+ CategoryInfo : InvalidOperation : (:) [Start-Process], InvalidOperationException
+ FullyQualifiedErrorId : InvalidOperationException,Microsoft.PowerShell.Commands.StartProcessCommand
+ PSComputerName : PROD-27 |
Exception Firewall : ok
Config Winrm du poste client : winrm get winrm/config
Code:
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53
|
Config
MaxEnvelopeSizekb = 500
MaxTimeoutms = 60000
MaxBatchItems = 32000
MaxProviderRequests = 4294967295
Client
NetworkDelayms = 5000
URLPrefix = wsman
AllowUnencrypted = false
Auth
Basic = true
Digest = true
Kerberos = true
Negotiate = true
Certificate = true
CredSSP = false
DefaultPorts
HTTP = 5985
HTTPS = 5986
TrustedHosts
Service
RootSDDL = O:NSG:BAD:P(A;;GA;;;BA)(A;;GR;;;IU)S:P(AU;FA;GA;;;WD)(AU;SA;GXGW;;;WD)
MaxConcurrentOperations = 4294967295
MaxConcurrentOperationsPerUser = 1500
EnumerationTimeoutms = 240000
MaxConnections = 300
MaxPacketRetrievalTimeSeconds = 120
AllowUnencrypted = false
Auth
Basic = false
Kerberos = true
Negotiate = true
Certificate = false
CredSSP = false
CbtHardeningLevel = Relaxed
DefaultPorts
HTTP = 5985
HTTPS = 5986
IPv4Filter = * [Source="GPO"]
IPv6Filter [Source="GPO"]
EnableCompatibilityHttpListener = false
EnableCompatibilityHttpsListener = false
CertificateThumbprint
AllowRemoteAccess = true [Source="GPO"]
Winrs
AllowRemoteShellAccess = true
IdleTimeout = 7200000
MaxConcurrentUsers = 2147483647
MaxShellRunTime = 2147483647
MaxProcessesPerShell = 2147483647
MaxMemoryPerShellMB = 2147483647
MaxShellsPerUser = 2147483647 |
Même retour via pssession
Code:
1 2 3 4 5 6 7 8
| $s=new-pssession -computer PROD-27
#Installation Resolve en version exe
Invoke-Command -session $s -ScriptBlock {
#Install
$a = Start-process "C:\windows\temp\$NomLogiciel1" -argumentlist "/q", "/i" -Wait
$b = Start-process "C:\windows\temp\$NomLogiciel2" -argumentlist "/qn" -Wait
} |
Code:
1 2 3 4 5 6 7 8 9
| Impossible dexécuter cette commande en raison de lerreur*: Échec de lexécution du serveur.
+ CategoryInfo : InvalidOperation : (:) [Start-Process], InvalidOperationException
+ FullyQualifiedErrorId : InvalidOperationException,Microsoft.PowerShell.Commands.StartProcessCommand
+ PSComputerName : PROD-27
Impossible dexécuter cette commande en raison de lerreur*: Échec de lexécution du serveur.
+ CategoryInfo : InvalidOperation : (:) [Start-Process], InvalidOperationException
+ FullyQualifiedErrorId : InvalidOperationException,Microsoft.PowerShell.Commands.StartProcessCommand
+ PSComputerName : PROD-27 |