[midPoint] Winrs (launch from server console)

Щенев Антон Вячеславович anton.shchenev at beeper.ru
Tue Jun 30 07:40:18 CEST 2020


Hi
Could you pls answer me how can I  check the operation of the command winrs  directly from the console(Linux)?

This script works fine from remote machines and creates a mailbox, but when working through midpoint in Windows logs is always the error(WSMan operation CreateShell failed, error code 2150859120)


<code>winrs -r:http://my.domain.com:5985 -u:????? -p:?????? powershell.exe -command "$username = '????'; $password = ConvertTo-SecureString '?????' -asplaintext -force; $UserCredential = New-Object -TypeName System.Management.Automation.PSCredential -argumentlist $username,$password; $Session = New-PSSession -ConfigurationName Microsoft.Exchange -ConnectionUri http://my.domain.com/powershell -Authentication Kerberos -Credential $UserCredential; Invoke-Command -Session $Session {enable-mailbox -Identity "test.test"};Get-PSSession | Remove-PSSession"</code>


I tried this option too
Winrs   -ad  -u:????? -p:?????? powershell.exe
The result is the same: WSMan operation CreateShell failed, error code 2150859120





С уважением,
Щенев Антон

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.evolveum.com/pipermail/midpoint/attachments/20200630/50c104bc/attachment.htm>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: image001.png
Type: image/png
Size: 1457 bytes
Desc: image001.png
URL: <https://lists.evolveum.com/pipermail/midpoint/attachments/20200630/50c104bc/attachment.png>


More information about the midPoint mailing list