Hello,
I allowed unencrypted on winrm client and winrm service with unrestricted execution-policy.
Below is the detailed traceback for win_ping:
TASK [win_ping] *********************************************************************************************************************************************
Using module file /usr/lib/python2.7/site-packages/ansible/modules/windows/win_ping.ps1
Pipelining is enabled.
<a.b.c.d> ESTABLISH WINRM CONNECTION FOR USER: ADM on PORT 5986 TO a.b.c.d
<a.b.c.d> WINRM CONNECT: transport=ssl endpoint=https://a.b.c.d:5986/wsman
<a.b.c.d> WINRM OPEN SHELL: 79601CF5-4113-4573-9E10-BC60C19BCD21
EXEC (via pipeline wrapper)
<a.b.c.d> WINRM EXEC ‘PowerShell’ [‘-NoProfile’, ‘-NonInteractive’, ‘-ExecutionPolicy’, ‘Unrestricted’, ‘-EncodedCommand’, u’UABvAHcAZQByAFMAaABlAGwAbAAgACsadsfasdfasdfasAcgBhAGMAdABpAHYAZQAgAC0ARQB4AGUAYwB1AHQAaQBvAG4AUABvAGwAaQBjAHkAIABVAG4AcgBlAHMAdAByAGkAYwB0AGUAZAAgAC0ARQBuAGMAbwBkAGUAZABDALPHANUMERICCHARREMOVEDFORBEVERTY************QQBLAEEAQwBRAEEAWgBRAEIANABBAEcAVQBBAFkAdwBCAGYAQQBIAGMAQQBjAGcAQgBoAEEASABBAEEAYwBBAEIAbABBAEgASQBBAEkAQQBBADkAQQBDAEEAQQBXAHcAQgBUAEEARwBNAEEAYwBnAEIAcABBAEgAQQBBAGQAQQBCAEMAQQBHAHcAQQBiAHcAQgBqAEEARwBzAEEAWABRAEEANgBBAEQAbwBBAFEAdwBCAHkAQQBHAFUAQQBZAFEAQgAwAEEARwBVAEEASwBBAEEAawBBAEgATQBBAGMAQQBCAHMAQQBHAGsAQQBkAEEAQgBmAEEASABBAEEAWQBRAEIAeQBBAEgAUQBBAGMAdwBCAGIAQQBEAEEAQQBYAFEAQQBwAEEAQQBvAEEASgBnAEEAawBBAEcAVQBBAGUAQQBCAGwAQQBHAE0AQQBYAHcAQgAzAEEASABJAEEAWQBRAEIAdwBBAEgAQQBBAFoAUQBCAHkAQQBBAD0APQA=‘]
<a.b.c.d> WINRM RESULT u’<Response code 1, out "{“exception”:“Except”, err “”>’
<a.b.c.d> WINRM STDOUT {“exception”:“Exception calling "CompileAssemblyFromDom" with "2" argument(s): "Could not find file \u0027C:\Users\ADM\AppData\Local\Temp\nzq3veem.dll\u0027."\r\nAt line:19 char:5\r\n+ Add-CSharpType -References $csharp_utils -TempPath $new_tmp -IncludeDebugInf …\r\n+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~\r\n + CategoryInfo : NotSpecified: ( [Add-CSharpType], MethodInvocationException\r\n + FullyQualifiedErrorId : FileNotFoundException,Add-CSharpType\r\n\r\nScriptStackTrace:\r\nat Add-CSharpType, \u003cNo file\u003e: line 273\r\nat \u003cScriptBlock\u003e, \u003cNo file\u003e: line 19\r\nat \u003cScriptBlock\u003e\u003cEnd\u003e, \u003cNo file\u003e: line 137\r\nat \u003cScriptBlock\u003e, \u003cNo file\u003e: line 7\r\n\r\nSystem.Management.Automation.MethodInvocationException: Exception calling "CompileAssemblyFromDom" with "2" argument(s): "Could not find file \u0027C:\Users\ADM\AppData\Local\Temp\nzq3veem.dll\u0027." —\u003e System.IO.FileNotFoundException: Could not find file \u0027C:\Users\ADM\AppData\Local\Temp\nzq3veem.dll\u0027.\r\n at System.IO.__Error.WinIOError(Int32 errorCode, String maybeFullPath)\r\n at System.IO.FileStream.Init(String path, FileMode mode, FileAccess access, Int32 rights, Boolean useRights, FileShare share, Int32 bufferSize, FileOptions options, SECURITY_ATTRIBUTES secAttrs, String msgPath, Boolean bFromProxy, Boolean useLongPath, Boolean checkHost)\r\n at System.IO.FileStream…ctor(String path, FileMode mode, FileAccess access, FileShare share, Int32 bufferSize, FileOptions options, String msgPath, Boolean bFromProxy, Boolean useLongPath, Boolean checkHost)\r\n at System.IO.File.InternalReadAllBytes(String path, Boolean checkHost)\r\n at Microsoft.CSharp.CSharpCodeGenerator.FromFileBatch(CompilerParameters options, String fileNames)\r\n at Microsoft.CSharp.CSharpCodeGenerator.FromDomBatch(CompilerParameters options, CodeCompileUnit ea)\r\n at Microsoft.CSharp.CSharpCodeGenerator.System.CodeDom.Compiler.ICodeCompiler.CompileAssemblyFromDomBatch(CompilerParameters options, CodeCompileUnit ea)\r\n at CallSite.Target(Closure , CallSite , Object , Object , Object )\r\n — End of inner exception stack trace —\r\n at System.Management.Automation.ExceptionHandlingOps.CheckActionPreference(FunctionContext funcContext, Exception exception)\r\n at System.Management.Automation.Interpreter.ActionCallInstruction2.Run(InterpretedFrame frame)\r\n at System.Management.Automation.Interpreter.EnterTryCatchFinallyInstruction.Run(InterpretedFrame frame)\r\n at System.Management.Automation.Interpreter.EnterTryCatchFinallyInstruction.Run(InterpretedFrame frame)\r\n at System.Management.Automation.Interpreter.Interpreter.Run(InterpretedFrame frame)\r\n at System.Management.Automation.Interpreter.LightLambda.RunVoid1[T0](T0 arg0)\r\n at System.Management.Automation.PSScriptCmdlet.RunClause(Action
1 clause, Object dollarUnderbar, Object inputToProcess)\r\n at System.Management.Automation.CommandProcessorBase.Complete()”,“msg”:“internal error: failed to run exec_wrapper action module_powershell_wrapper: Exception calling "CompileAssemblyFromDom" with "2" argument(s): "Could not find file \u0027C:\Users\ADM\AppData\Local\Temp\nzq3veem.dll\u0027."”,“failed”:true}
<a.b.c.d> WINRM STDERR
<a.b.c.d> WINRM CLOSE SHELL: 79601CF5-4113-4573-9E10-BC60C19BCD21
The full traceback is:
Exception calling “CompileAssemblyFromDom” with “2” argument(s): “Could not find file ‘C:\Users\ADM\AppData\Local\Temp\nzq3veem.dll’.”
At line:19 char:5
- Add-CSharpType -References $csharp_utils -TempPath $new_tmp -IncludeDebugInf …
-
- CategoryInfo : NotSpecified: ( [Add-CSharpType], MethodInvocationException
- FullyQualifiedErrorId : FileNotFoundException,Add-CSharpType
ScriptStackTrace:
at Add-CSharpType, : line 273
at , : line 19
at , : line 137
at , : line 7
System.Management.Automation.MethodInvocationException: Exception calling “CompileAssemblyFromDom” with “2” argument(s): “Could not find file ‘C:\Users\ADM\AppData\Local\Temp\nzq3veem.dll’.” —> System.IO.FileNotFoundException: Could not find file ‘C:\Users\ADM\AppData\Local\Temp\nzq3veem.dll’.
at System.IO.__Error.WinIOError(Int32 errorCode, String maybeFullPath)
at System.IO.FileStream.Init(String path, FileMode mode, FileAccess access, Int32 rights, Boolean useRights, FileShare share, Int32 bufferSize, FileOptions options, SECURITY_ATTRIBUTES secAttrs, String msgPath, Boolean bFromProxy, Boolean useLongPath, Boolean checkHost)
at System.IO.FileStream…ctor(String path, FileMode mode, FileAccess access, FileShare share, Int32 bufferSize, FileOptions options, String msgPath, Boolean bFromProxy, Boolean useLongPath, Boolean checkHost)
at System.IO.File.InternalReadAllBytes(String path, Boolean checkHost)
at Microsoft.CSharp.CSharpCodeGenerator.FromFileBatch(CompilerParameters options, String fileNames)
at Microsoft.CSharp.CSharpCodeGenerator.FromDomBatch(CompilerParameters options, CodeCompileUnit ea)
at Microsoft.CSharp.CSharpCodeGenerator.System.CodeDom.Compiler.ICodeCompiler.CompileAssemblyFromDomBatch(CompilerParameters options, CodeCompileUnit ea)
at CallSite.Target(Closure , CallSite , Object , Object , Object )
— End of inner exception stack trace —
at System.Management.Automation.ExceptionHandlingOps.CheckActionPreference(FunctionContext funcContext, Exception exception)
at System.Management.Automation.Interpreter.ActionCallInstruction2.Run(InterpretedFrame frame) at System.Management.Automation.Interpreter.EnterTryCatchFinallyInstruction.Run(InterpretedFrame frame) at System.Management.Automation.Interpreter.EnterTryCatchFinallyInstruction.Run(InterpretedFrame frame) at System.Management.Automation.Interpreter.Interpreter.Run(InterpretedFrame frame) at System.Management.Automation.Interpreter.LightLambda.RunVoid1[T0](T0 arg0) at System.Management.Automation.PSScriptCmdlet.RunClause(Action
1 clause, Object dollarUnderbar, Object inputToProcess)
at System.Management.Automation.CommandProcessorBase.Complete()
fatal: [a.b.c.d]: FAILED! => changed=false
msg: ‘internal error: failed to run exec_wrapper action module_powershell_wrapper: Exception calling “CompileAssemblyFromDom” with “2” argument(s): “Could not find file ‘‘C:\Users\ADM\AppData\Local\Temp\nzq3veem.dll’’.”’