Git Product home page Git Product logo

psl-omi-provider's Introduction

logo PowerShell

Welcome to the PowerShell GitHub Community! PowerShell is a cross-platform (Windows, Linux, and macOS) automation and configuration tool/framework that works well with your existing tools and is optimized for dealing with structured data (e.g. JSON, CSV, XML, etc.), REST APIs, and object models. It includes a command-line shell, an associated scripting language, and a framework for processing cmdlets.

Windows PowerShell vs. PowerShell Core

Although this repository started as a fork of the Windows PowerShell codebase, changes made in this repository are not automatically ported back to Windows PowerShell 5.1. This also means that issues tracked here are only for PowerShell Core 6 and higher. Windows PowerShell specific issues should be reported with the Feedback Hub app, by choosing "Apps > PowerShell" in the category.

New to PowerShell?

If you are new to PowerShell and want to learn more, we recommend reviewing the getting started documentation.

Get PowerShell

You can download and install a PowerShell package for any of the following platforms.

Supported Platform Download (LTS) Downloads (stable) Downloads (preview) How to Install
Windows (x64) .msi .msi .msi Instructions
Windows (x86) .msi .msi .msi Instructions
Ubuntu 22.04 .deb .deb .deb Instructions
Ubuntu 20.04 .deb .deb .deb Instructions
Ubuntu 18.04 .deb .deb .deb Instructions
Ubuntu 16.04 .deb N/A N/A Instructions
Debian 10 .deb .deb .deb Instructions
Debian 11 .deb .deb .deb
CentOS 7 .rpm .rpm .rpm Instructions
CentOS 8 .rpm .rpm .rpm
Red Hat Enterprise Linux 7 .rpm .rpm .rpm Instructions
openSUSE 42.3 .rpm .rpm .rpm Instructions
Fedora 35 .rpm .rpm .rpm Instructions
macOS 10.13+ (x64) .pkg .pkg .pkg Instructions
macOS 11+ (arm64) .pkg .pkg .pkg Instructions
Docker Instructions

You can download and install a PowerShell package for any of the following platforms, which are supported by the community.

Platform Downloads (stable) Downloads (preview) How to Install
Arch Linux Instructions
Kali Linux .deb .deb Instructions
Many Linux distributions Snapcraft Snapcraft

You can also download the PowerShell binary archives for Windows, macOS, and Linux.

Platform Downloads (stable) Downloads (preview) How to Install
Windows 32-bit/64-bit 32-bit/64-bit Instructions
macOS (x64) 64-bit 64-bit Instructions
macOS (arm64) 64-bit 64-bit Instructions
Linux 64-bit 64-bit Instructions
Windows (ARM) 64-bit (preview) 64-bit Instructions
Raspbian (ARM) 32-bit/64-bit 32-bit/64-bit Instructions

To install a specific version, visit releases.

Upgrading PowerShell

For best results when upgrading, you should use the same install method you used when you first installed PowerShell. The update method will be different for each platform and install method. For more information, see Installing PowerShell.

Community Dashboard

Dashboard with visualizations for community contributions and project status using PowerShell, Azure, and PowerBI.

For more information on how and why we built this dashboard, check out this blog post.

Discussions

GitHub Discussions is a feature to enable free and open discussions within the community for topics that are not related to code, unlike issues.

This is an experiment we are trying in our repositories, to see if it helps move discussions out of issues so that issues remain actionable by the team or members of the community. There should be no expectation that PowerShell team members are regular participants in these discussions. Individual PowerShell team members may choose to participate in discussions, but the expectation is that community members help drive discussions so that team members can focus on issues.

Create or join a discussion.

Chat

Want to chat with other members of the PowerShell community?

There are dozens of topic-specific channels on our community-driven PowerShell Virtual User Group, which you can join on:

Add-ons and libraries

Awesome PowerShell has a great curated list of add-ons and resources.

Building the Repository

Linux Windows macOS
Instructions Instructions Instructions

If you have any problems building, consult the developer FAQ.

Build status of nightly builds

Azure CI (Windows) Azure CI (Linux) Azure CI (macOS) CodeFactor Grade
windows-nightly-image linux-nightly-image macOS-nightly-image cf-image

Downloading the Source Code

You can clone the repository:

git clone https://github.com/PowerShell/PowerShell.git

For more information, see working with the PowerShell repository.

Developing and Contributing

Please look into the Contribution Guide to know how to develop and contribute. If you are developing .NET Core C# applications targeting PowerShell Core, check out our FAQ to learn more about the PowerShell SDK NuGet package.

Also, make sure to check out our PowerShell-RFC repository for request-for-comments (RFC) documents to submit and give comments on proposed and future designs.

Support

For support, see the Support Section.

Legal and Licensing

PowerShell is licensed under the MIT license.

Windows Docker Files and Images

License: By requesting and using the Container OS Image for Windows containers, you acknowledge, understand, and consent to the Supplemental License Terms available on Docker Hub:

Telemetry

Please visit our about_Telemetry topic to read details about telemetry gathered by PowerShell.

Governance

The governance policy for the PowerShell project is described here.

This project has adopted the Microsoft Open Source Code of Conduct. For more information, see the Code of Conduct FAQ or contact [email protected] with any additional questions or comments.

psl-omi-provider's People

Contributors

andyleejordan avatar bettyboy avatar dantramsft avatar daxian-dbw avatar jeffaco avatar jumpingyang001 avatar krisbash avatar niroyb avatar palladia avatar paulcallen avatar yakman2020 avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

psl-omi-provider's Issues

Copy-Item -ToSession from WIndows to Linux corrupts the transferred file

Having the following environment:

Linux OS is SLES 12-SP2 x86_64
tony@linux-31cz:~> /opt/omi/bin/omiserver -v
/opt/omi/bin/omiserver: OMI-1.5.0-0 - Mon Jul 23 09:07:48 PDT 2018
tony@linux-31cz:~> rpm -qa | grep psrp
omi-psrp-server-1.4.2-2.x86_64
tony@linux-31cz:~> rpm -qa | grep powershell
powershell-6.1.0-1.rhel.7.x86_64

On Windows 2016 with the default Powershell

PS C:\Users\Administrator.ADIDAS> $host


Name             : ConsoleHost
Version          : 5.1.14393.2155
InstanceId       : 4f6ce772-9aa7-46a4-9b2f-116d54cc1117
UI               : System.Management.Automation.Internal.Host.InternalHostUserInterface
CurrentCulture   : en-US
CurrentUICulture : en-US
PrivateData      : Microsoft.PowerShell.ConsoleHost+ConsoleColorProxy
DebuggerEnabled  : True
IsRunspacePushed : False
Runspace         : System.Management.Automation.Runspaces.LocalRunspace

On Windows i create a remote powershell session to Linux SLES, and the Remote copy from Windows to Linux fails:

Windows PowerShell
Copyright (C) 2016 Microsoft Corporation. All rights reserved.

PS C:\Users\Administrator.ADIDAS> $SecurePass = ConvertTo-SecureString -String "root-password" -AsPlainText -Force
PS C:\Users\Administrator.ADIDAS> $Cred = New-Object System.Management.Automation.PSCredential "root" , $SecurePass
PS C:\Users\Administrator.ADIDAS> $Opt = New-PSSessionOption -SkipCACheck -SkipRevocationCheck -SkipCNCheck
PS C:\Users\Administrator.ADIDAS> $Session = New-PsSession -Credential $Cred -ComputerName 11.0.0.21 -Port 5986 -Authentication Basic -SessionOption $Opt -UseSSL
PS C:\Users\Administrator.ADIDAS> Copy-Item -Path 'c:\package-8.1.7-0.x86_64.tar.gz' -Destination '/tmp/' -ToSession $Session -UseTransaction
>>
The provider does not support transactions. Perform the operation again without the -UseTransaction parameter.
At line:1 char:1
+ Copy-Item -Path 'c:\package-8.1.7-0.x86_64.tar.gz ...
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    + CategoryInfo          : NotImplemented: (:) [], PSNotSupportedException
    + FullyQualifiedErrorId : NotSupported

PS C:\Users\Administrator.ADIDAS> Copy-Item -Path 'c:\package-8.1.7-0.x86_64.tar.gz' -Destination '/tmp/' -ToSession $Session
PS C:\Users\Administrator.ADIDAS> Enter-PSSession $Session
[11.0.0.21]: PS /root> iex 'tar -tzf /tmp/package-8.1.7-0.x86_64.tar.gz'
opt/app/
opt/app/DE_DE/
opt/app/DE_DE/tdps.cat
opt/app/EN_US/
opt/app/EN_US/tdps.cat
opt/app/ES_ES/
opt/app/ES_ES/tdps.cat
opt/app/FR_FR/
opt/app/FR_FR/tdps.cat
opt/app/IT_IT/
opt/app/IT_IT/tdps.cat
opt/app/JA_JP/
opt/app/JA_JP/tdps.cat
opt/app/KO_KR/
opt/app/KO_KR/tdps.cat
opt/app/PT_BR/
opt/app/PT_BR/tdps.cat
opt/app/ZH_CN/
opt/app/ZH_CN/tdps.cat
opt/app/ZH_TW/
opt/app/ZH_TW/tdps.cat
opt/app/mssqlsmoapp_root/
opt/app/mssqlsmoapp_root/mssqlsmoapp.dll
opt/app/mssqlsmoapp_root/mssqlsmoapp.pdb
opt/app/mssqlsmoapp_root/Microsoft.Data.Tools.Sql.BatchParser.dll
opt/app/mssqlsmoapp_root/Microsoft.SqlServer.ConnectionInfo.dll
opt/app/mssqlsmoapp_root/Microsoft.SqlServer.Management.Dmf.dll
opt/app/mssqlsmoapp_root/Microsoft.SqlServer.Management.Sdk.Sfc.dll
opt/app/mssqlsmoapp_root/Microsoft.SqlServer.Smo.dll
opt/app/mssqlsmoapp_root/Microsoft.SqlServer.SmoExtended.dll
opt/app/mssqlsmoapp_root/Microsoft.SqlServer.SqlEnum.dll
opt/app/mssqlsmoapp_root/NetCoreGlobalization.dll
opt/app/mssqlsmoapp_root/Newtonsoft.Json.dll
opt/app/mssqlsmoapp_root/Microsoft.CSharp.dll
opt/app/mssqlsmoapp_root/Microsoft.VisualBasic.dll
/bin/tar: Skipping to next header
/bin/tar: A lone zero block at 20330
/bin/tar: Exiting with failure status due to previous errors
[11.0.0.21]: PS /root>

Initial Windows documented WinRM setup failing

  • Windows OS:
    Microsoft Windows [Version 10.0.16199.1000]

*Windows PowerShell:
PS C:\WINDOWS\system32> $PSVersionTable

Name Value


PSVersion 5.1.16199.1000
PSEdition Desktop
PSCompatibleVersions {1.0, 2.0, 3.0, 4.0...}
BuildVersion 10.0.16199.1000
CLRVersion 4.0.30319.42000
WSManStackVersion 3.0
PSRemotingProtocolVersion 2.3
SerializationVersion 1.1.0.1

Issue:
I'm not sure what's wrong but when running initial steps to setup WinRM in Windows is failing:
PS C:\WINDOWS\system32> winrm set winrm/config/Client @{TrustedHosts="*"}
Error: Invalid use of command line. Type "winrm -?" for help.
PS C:\WINDOWS\system32>
PS C:\WINDOWS\system32> winrm set winrm/config/Service/Auth @{Basic="true"}
Error: Invalid use of command line. Type "winrm -?" for help.

Repro:

  1. Open Windows PowerShell as Adminstrator.
  2. Following steps on link: https://github.com/PowerShell/psl-omi-provider#connecting-from-linux-to-windows
    (Section: Connecting from Linux to Windows)

winrmerror_2017-05-28_9-43-01

Regression bug: PSRP client on Linux throws ERROR_WSMAN_SCHEMA_VALIDATION_ERROR when ConfigurationName is used.

Opening the issue here, as requested by @SteveL-MSFT in PowerShell/PowerShell#3186

I'm trying to use psl-omi-provider (client) to connect from Linux to Windows.
It works fine on any version I've tried (alpha 14-16) if I use default configuration (not using ConfigurationName parameter).

When I use this parameter in alpha 14 it also works fine. Unfortunately, both alpha 15 and 16 will report issue with schema:

$ps2 = New-PSSession -ComputerName jumpbox -Credential $cred -Authentication basic -ConfigurationName DnsAdminRole

New-PSSession : [jumpbox] Connecting to remote server jumpbox failed with the following error message : 
ERROR_WSMAN_SCHEMA_VALIDATION_ERROR: The SOAP XML in the message does not match the corresponding XML schema definition. 
Change the XML and retry.  For more information, see the about_Remote_Troubleshooting Help topic.
At line:1 char:8
+ $ps2 = New-PSSession -ComputerName jumpbox -Credential $cred -Authent ...
+        ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    + CategoryInfo          : OpenError: (System.Manageme....RemoteRunspace:RemoteRunspace) [New-PSSession], PSRemotingTransportException
    + FullyQualifiedErrorId : 1,PSSessionOpenFailed

Basic Auth over HTTPS from reports MI_RESULT_ACCESS_DENIED

With PowerShell version 6.1 preview and PSRP 1.4.2-2, attempting to create a new PSSession using Basic Authentication and -UseSSL reports error code 2 (MI_RESULT_ACCESS_DENIED)

Repro:
PS> $cred = Get-Credential username@hostname
PS> $session = New-PSSession -Computer -Credential $cred -Authentication Basic -UseSSL

Expected:
A PSSession is created.

Actual:
New-PSSession : [dantradesk] Connecting to remote server dantradesk failed with the following error message : Basic Authorization failed for user psrptest@dantradesk For more information, see the about_Remote_Troubleshooting Help topic.
At line:1 char:12

  • $session = New-PSSession -ComputerName dantradesk -Credential $cred - ...
  •        ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    
  • CategoryInfo : OpenError: (System.Manageme....RemoteRunspace:RemoteRunspace) [New-PSSession], PSRemotingTransportException
  • FullyQualifiedErrorId : 2,PSSessionOpenFailed

Error thrown when initiating NEW-PSSession to Centos Linux

Clean compile of OMI and PSL-OMI-Provider
Providing userid of root and matching password when prompted for Get-Credential on Windows.

PS D:> $o=New-PSSessionOption -SkipCACheck -SkipRevocationCheck -SkipCNCheck
PS D:> New-PSSession -Computername 10.254.0.130 -Credential $c -Authentication basic -UseSSL -SessionOption $o
New-PSSession : The type initializer for 'System.Management.Automation.ConfigPropertyAccessor' threw an exception.
At line:1 char:1

  • New-PSSession -Computername 10.254.0.130 -Credential $c -Authenticati ...
  • - CategoryInfo          : OpenError: (System.Manageme....RemoteRunspace:RemoteRunspace) [New-PSSession], RemoteException
    - FullyQualifiedErrorId : PSSessionOpenFailed
    

Communicate features in progress

Hello,

I believe that @paulcallen, @palladia, and @yakman2020 have a few features in progress to eliminate these two required steps:

winrm set winrm/config/Service @{AllowUnencrypted="true"}
winrm set winrm/config/Service/Auth @{Basic="true"}

I'm being asked for progress on that, and realized that we don't have a list anywhere public of features currently in progress. Is this something we could provide, either in the readme or in a set of issues?

Build error on Raspbian

I have following build error on Raspian Stretch (32-bit Linux for Raspberry Pi):

/home/pi/psl-omi-provider/src/Shell.c: In function ‘Shell_CreateInstance’:
/home/pi/psl-omi-provider/src/Shell.c:956:67: error: cast from pointer to integer of different size [-Werror=pointer-to-int-cast]
         if (Stprintf(shellData->shellId, ID_LENGTH, MI_T("%llx"), (MI_Uint64) shellData) < 0)
                                                                   ^
/home/pi/psl-omi-provider/src/Shell.c: In function ‘Shell_Invoke_Command’:
/home/pi/psl-omi-provider/src/Shell.c:1362:67: error: cast from pointer to integer of different size [-Werror=pointer-to-int-cast]
         Stprintf(commandData->commandId, ID_LENGTH, MI_T("%llx"), (MI_Uint64)commandData);
                                                                   ^
cc1: all warnings being treated as errors
CMakeFiles/psrpomiprov.dir/build.make:62: recipe for target 'CMakeFiles/psrpomiprov.dir/Shell.c.o' failed
make[3]: *** [CMakeFiles/psrpomiprov.dir/Shell.c.o] Error 1

Is it possible to build for 32-bit Linux?

PSRP logging through OMI needs improvements

Currently, the PSRP provider through OMI uses OMI's logging capabilities. This is problematic in several ways:

  1. Frequently, it's better to debug PSRP independently from OMI, and
  2. PSRP, running as @requestor@, does not actually have permissions to write to OMI's logging directory.

As a short term hack to get logging running, you can do the following:

  • chmod 777 /var/opt/omi/log
  • Enable debug logging in /etc/opt/omi/conf/omiserver.conf
  • PSRP server will log to the /var/opt/omi/log/ShellServer.log.

This, of course, has the disadvantage that anybody on the system can write freely to /var/opt/omi/log.

A much better logging mechanism is to do what SCX does:

  1. Create a small EXEC program, similar to SCX's tool, to create directory /var/opt/microsoft/psrp/log/<username>, where that directory is owned by the user in question,
  2. Have a separate configuration file that PSRP reads to determine if it should log or not,
  3. Have a logging directory explicitly for PSRP, perhaps in /var/opt/microsoft/psrp/log.
    • If the requester is root, then the log file is created in that directory (no subdirectory is created),
    • If the requester is non-root, use the new directory. Due to omi-preexec having been run, permissions will be set so that user can write the log into that directory.

This would vastly simplify and improve the PSRP provider's logging mechanism.

Remove Pester submodule

@JumpingYang001 confirmed internally that no changes will be made to Pester, and that the PowerShell 6.0 packages will be installed for testing purposes. As these packages include the Pester PowerShell module, the submodule introduced in #42 is unnecessary.

PowerShell Core Dbg.Assert when it unmarshals results from PSRP

For debug builds, WSManReceiveDataResult.Unmarshal hits a Dbg.Assert due the result data type being marked as Text instead of Binary (see https://github.com/PowerShell/PowerShell/blob/6febd1f8831ec4ab2127c4fef934484eb2ca374f/src/System.Management.Automation/engine/remoting/fanin/WSManNativeAPI.cs#L1937)

When debugging, the data is, in fact, binary and release builds work as expected since it doesn't validate the date type.

The impact is debug builds of PowerShell Core cannot be used with PSRP/Linux.

Intermittent hangs while establishing a WinRM connection from a Linux client to a Windows server

I'm trying to track down a hang that occurs intermittently but reliably (about 10-20% of the time) while connecting from a Linux client to a Windows server. When the connection is attempted, WinRM might not yet be running and/or the credentials we're trying to use might not yet be working, but instead of throwing an exception, the client simply hangs (forever, even if the server is shut down).

I've tried enabling OMI client logging, but strangely, when I set the log level to INFO or higher, the problem disappears, which makes me suspect a race condition either in this library or libmi. When the log level is left at the default value (WARNING), none of the OMI log files reference the server which the client is hanging trying to connect to, presumably because the connection handshake didn't progress far enough before it hung.

Can you give me any suggestions as to how I can capture additional details that will help us to track down the issue here?

Cannot connect to omi server since PowerShell v6.0.0-beta.3

I just upgraded from PowerShell v6.0.0-beta.2 to PowerShell v6.0.0-beta.3 and since then i am not able to connect from Windows to Linux with PowerShell Remoting:

Steps to reproduce:

On the Linux side:
sudo apt install powershell omi omi-psrp-server

On the Windows side:
$creds = Get-Credential
Enter-PSSession -ComputerName HOSTNAME -Credential $creds -Authentication Basic -SessionOption $(New-PSSessionOption -SkipCACheck -SkipCNCheck) -UseSSL

Logs:
2017/06/26 11:48:26 [3619,3619] WARNING: null(0): EventId=30058 Priority=WARNING failed to call provider's load with result 1; class: Shell
2017/06/26 11:48:26 [3619,3619] WARNING: null(0): EventId=30066 Priority=WARNING failed to open the provider psrpomiprov for class Shell
2017/06/26 11:48:26 [3619,3619] ERROR: null(0): EventId=20001 Priority=ERROR Agent _RequestCallback: ProvMgr_NewRequest failed with result 1 !

Regards
Richard

Trying to copy file from Windows to Linux hangs

Installed on Suse 12 with SP2 the following
powershell-6.0.4-1.rhel.7.x86_64
omi-1.4.3-1.x86_64 for the installed SSL 1.0.2
omi-psrp-server-1.4.2-2.x86_64

I am trying to run on Windows the following but Copy-Item hangs:

$SecurePass = ConvertTo-SecureString -String "root_password" -AsPlainText -Force
$Cred = New-Object System.Management.Automation.PSCredential "root" , $SecurePass
$Opt = New-PsSessionOption -SkipCACheck -SkipCNCheck -SkipRevocationCheck
$Session = New-PsSession -Credential $Cred -ComputerName 11.0.0.21 -Port 5986 -Authentication Basic -SessionOption $Opt -UseSSL
Copy-Item -Path 'C:\Downloads\App-LinuxX86.tar' -Destination /home/user/ -ToSession $Session

Note: 11.0.0.21 is the Linux IP address.
Note 2: Enter-PSSession $Session works. Remote Powershell was configured OK.
Note 3: App-LinuxX86.tar has 300MB size.

omiserver.log says:
2018/08/27 16:59:55 [21765,21765] WARNING: null(0): EventId=30161 Priority=WARNING WsmanConnection: 0x2503e50 _ProcessInstanceConnectionData: expired
2018/08/27 16:59:55 [21765,21765] WARNING: null(0): EventId=30162 Priority=WARNING WsmanConnection: 0x2503e50 _ProcessResultConnectionData: no request
2018/08/27 16:59:55 [21765,21765] WARNING: null(0): EventId=30119 Priority=WARNING ssl-read: unexpected sys error 104

2018/08/27 16:59:55 [21765,21765] WARNING: null(0): EventId=30161 Priority=WARNING WsmanConnection: 0x2503e90 _ProcessInstanceConnectionData: expired
2018/08/27 16:59:55 [21765,21765] WARNING: null(0): EventId=30162 Priority=WARNING WsmanConnection: 0x2503e90 _ProcessResultConnectionData: no request
2018/08/27 16:59:58 [21765,21765] WARNING: null(0): EventId=30119 Priority=WARNING ssl-read: unexpected sys error 104

2018/08/27 16:59:58 [21765,21765] WARNING: null(0): EventId=30161 Priority=WARNING WsmanConnection: 0x2513110 _ProcessInstanceConnectionData: expired
2018/08/27 16:59:58 [21765,21765] WARNING: null(0): EventId=30162 Priority=WARNING WsmanConnection: 0x2513110 _ProcessResultConnectionData: no request

shellserver.log says
2018/08/27 16:37:14 [21164,21164] ERROR: null(0): Shell_Load PostResult 0x7ffd6cf8af80, 0
2018/08/27 16:44:40 [21441,21441] ERROR: null(0): Shell_Load PostResult 0x7ffcaa0d3400, 0
2018/08/27 16:51:14 [21795,21795] ERROR: null(0): Shell_Load PostResult 0x7ffc43f32410, 0

linux client connection to windows 10 using basic auth and unencrypted traffic doesn't work (MI_RESULT_ACCESS_DENIED)

On the freshly installed windows 10 machine I've run as Administrator:

# allow clear traffic and basic auth for both server and client
winrm set winrm/config/service '@{AllowUnencrypted="true"}'
winrm set winrm/config/service/auth '@{Basic = true}'
winrm set winrm/config/client '@{AllowUnencrypted="true"}
winrm set winrm/config/client/auth '@{Basic = true}'

# allow connection from any host
Set-Item WSMan:\localhost\Client\TrustedHosts -Value "*" -Force

# enable ps remoting
Enable-PSRemoting -SkipNetworkProfileCheck -Force

# add test user (admin group)
net user /add aapteladmin aapteladmin
net localgroup administrators aapteladmin /add

# simple local test is working (from win10 to itself)
enter-pssession -computername 192.168.100.215 -credential aapteladmin -authentication basic
(type aapteladmin as pw)
[192.168.100.215]: PS C:\Users\aapteladmin\Documents>

Now that I know it's working from windows I try from linux.

I've installed powershell from the microsoft rhel7 repos (Powershell v6.1.0-preview.1).

Here are the commit hash after the clone for the main and sub repos:

$ for d in . omi pal; do ( cd $d && echo -en "$d:\t" && git --no-pager log -n1 --pretty=oneline ); done
.:      2cbb1ae (HEAD -> master, origin/master, origin/dantra/issue112, origin/HEAD) Update README.md
omi:    1770fbe (HEAD, tag: v1.4.1-0) Resolve problems with psrp issues #437,#438,#439
pal:    60fdaa6 (HEAD) Adding log suppression messages

Building...

$ make debug
(ends successfully ... output here https://pastebin.com/raw/HaiW0PDU )

$ find -iname '*.so'
./omi/Unix/output/lib/libnits.so
./omi/Unix/output/lib/libnitsinj.so
./omi/Unix/output/lib/libnitssampleproduct.so
./omi/Unix/output/lib/libnitssample.so
./omi/Unix/output/lib/libnits_test_build_sample.so
./omi/Unix/output/lib/libmi.so
./omi/Unix/output/lib/libmi_origin.so
./omi/Unix/output/lib/libomiidentify.so
./omi/Unix/output/lib/libmicxx.so
./omi/Unix/output/lib/libomiclient.so
./omi/Unix/output/lib/libColor.so
./omi/Unix/output/lib/libConnector.so
./omi/Unix/output/lib/libConnectorProviderCXX.so
./omi/Unix/output/lib/libmifastener.so
./omi/Unix/output/lib/libNumber.so
./omi/Unix/output/lib/libnumberProvider.so
./omi/Unix/output/lib/libPersonProvider.so
./omi/Unix/output/lib/libPersonProviderCXX.so
./omi/Unix/output/lib/libPresidentProvider.so
./omi/Unix/output/lib/libDogProvider.so
./omi/Unix/output/lib/libDatetimeProvider.so
./omi/Unix/output/lib/libTesterProvider.so
./omi/Unix/output/lib/libTestClass_AllDMTFTypes.so
./omi/Unix/output/lib/libTest_SchemaRetrieval.so
./omi/Unix/output/lib/libtest_io.so
./omi/Unix/output/lib/libtest_mof.so
./omi/Unix/output/lib/libtest_base.so
./omi/Unix/output/lib/libtest_provreg.so
./omi/Unix/output/lib/libtest_provmgr.so
./omi/Unix/output/lib/libtest_micxx.so
./omi/Unix/output/lib/libtest_sock.so
./omi/Unix/output/lib/libtest_protocol.so
./omi/Unix/output/lib/libtest_http.so
./omi/Unix/output/lib/libtest_cli.so
./omi/Unix/output/lib/libtest_wsman.so
./omi/Unix/output/lib/libtest_wql.so
./omi/Unix/output/lib/libtest_strhash.so
./omi/Unix/output/lib/libtest_xml.so
./omi/Unix/output/lib/libtest_xmlserializer.so
./omi/Unix/output/lib/libtest_PersonProvider.so
./omi/Unix/output/lib/libtest_miapi.so
./omi/Unix/output/lib/libtest_oi.so
./omi/Unix/output/lib/libtest_mimofcodec.so
./omi/Unix/output/lib/libTestIndication.so
./omi/Unix/output/lib/libtest_indication.so
./omi/Unix/output/lib/libtest_pal.so
./omi/Unix/output/lib/libpsrpomiprov.so
./pal/test/ext/lib/hpux/ia64/cppunit/libcppunit.so
./pal/test/ext/lib/linux/ia32/cppunit/libcppunit.so
./pal/test/ext/lib/linux/x64/cppunit/libcppunit.so
./pal/test/ext/lib/solaris/ia32/cppunit/libcppunit.so
./pal/test/ext/lib/solaris/sparc/cppunit/libcppunit.so
./src/libpsrpomiprov.so
./src/libpsrpclient.so

Make didn't fail and all the libs seems to be built.

$ export LD_LIBRARY_PATH=$PWD/src:$PWD/omi/Unix/output/lib:$LD_LIBRARY_PATH
$ echo $LD_LIBRARY_PATH
/home/aaptel/prog/psl-omi-provider/src:/home/aaptel/prog/psl-omi-provider/omi/Unix/output/lib:
$ pwsh
PowerShell v6.1.0-preview.1
Copyright (c) Microsoft Corporation. All rights reserved.

https://aka.ms/pscore6-docs
Type 'help' to get help.

PS /home/aaptel/prog/psl-omi-provider> Enter-PSSession -Computername 192.168.100.215 -Credential aapteladmin -Authentication Basic

PowerShell credential request
Enter your credentials.
Password for user aapteladmin: *********** (typed aapteladmin as pw)

Enter-PSSession : Connecting to remote server 192.168.100.215 failed with the following error message : MI_RESULT_ACCESS_DENIED For more information, see the about_Remote_Troubleshooting Help topic.
At line:1 char:1
+ Enter-PSSession -Computername 192.168.100.215 -Credential aapteladmin ...
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+ CategoryInfo          : InvalidArgument: (192.168.100.215:String) [Enter-PSSession], PSRemotingTransportException
+ FullyQualifiedErrorId : CreateRemoteRunspaceFailed

PS /home/aaptel/prog/psl-omi-provider>

I still get the same MI_RESULT_ACCESS_DENIED error (same as before using psl-omi-provider).

Deadlocks in PSSession stack after closed connection

Cross-post from PowerShell/PowerShell#5685

Steps to reproduce

Test case 1:

$Session = New-PSSession -ComputerName $Computer -Credential $Cred -Authentication Negotiate
Invoke-Command -Session $Session -ScriptBlock {Write-Host '1st'}
$Session | Remove-PSSession
Write-Host '2nd'
$Session = New-PSSession -ComputerName $Computer -Credential $Cred -Authentication Negotiate
Invoke-Command -Session $Session -ScriptBlock {Write-Host '3rd'}
$Session | Remove-PSSession
Expected output:
1st
2nd
3rd
Outcome:
1st
2nd
[The script causes a hang here]

Test case 2:

$Sessions = New-Object System.Collections.ArrayList
$Session = New-PSSession -ComputerName $Computer -Credential $Cred -Authentication Negotiate
[void]$Sessions.Add($Session)
Invoke-Command -Session $Session -ScriptBlock {Write-Host '1st'}

$Session = New-PSSession -ComputerName $Computer -Credential $Cred -Authentication Negotiate
[void]$Sessions.Add($Session)
Invoke-Command -Session $Session -ScriptBlock {Write-Host '2nd'}

$Sessions | Remove-PSSession

Write-Host '3rd'
Expected output:
1st
2nd
3rd
Outcome:
1st
2nd
[The script causes a hang here]

Test case 3:

$Session = New-PSSession -ComputerName $Computer -Credential $Cred -Authentication Negotiate
Invoke-Command -Session $Session -ScriptBlock {Write-Host '1st'; Exit}
Write-Host '2nd'
$Session = New-PSSession -ComputerName $Computer -Credential $Cred -Authentication Negotiate
Invoke-Command -Session $Session -ScriptBlock {Write-Host '3rd'; Exit}
Expected output:
1st
2nd
3rd
Outcome:
1st
2nd
[The script causes a hang here]

Replacing $Session | Remove-Session with $Session.Runspace.Dispose() or $Session.Runspace.Close() causes the same behaviour. The behaviour occurs regardless of chosen Authentication method. The behaviour is not observed using SSH based sessions.

I am using ubuntu 16.04, with the following packages from the microsoft repo:

powershell 6.0.1-1.ubuntu.16.04
omi 1.4.2.1
omi-psrp-server 1.4.1.28

The error occurs reliably on every attempt and should be easy to reproduce.

PS /> $PSVersionTable

Name                           Value
----                           -----
PSVersion                      6.0.1
PSEdition                      Core
GitCommitId                    v6.0.1
OS                             Linux 4.4.0-112-generic #135-Ubuntu SMP Fri Jan 19 11:48:36 UTC 2018
Platform                       Unix
PSCompatibleVersions           {1.0, 2.0, 3.0, 4.0...}
PSRemotingProtocolVersion      2.3
SerializationVersion           1.1.0.1
WSManStackVersion              3.0

Cannot do a Kerberos/Negotiate authentification on remote windows if winrm AllowUnencrypted set to "false" on remote

When trying to log in with domain credential with the -Authentificate Negotiate I end up with an access denied if winrm AllowUnencrypted set to "false" on the remote, setting it to true gives me the expected return.

x.x.x.x] Connecting to remote server x.x.x.x failed with the following error message : MI_RESULT_ACCESS_DENIED For more information, see the about_Remote_Troubleshooting Help topic.
+ CategoryInfo : OpenError: (x.x.x.x:String) [], PSRemotingTransportException
+ FullyQualifiedErrorId : 2,PSSessionStateBroken

I've tried connection from a windows box and it works as expected with AllowUnencrypted set to "false" on the remote.

It's as if the windows remote wouldn't detect the linux connection as being encrypted..

Winrm config on remote :

PS C:\Windows\system32> .\winrm id
IdentifyResponse
ProtocolVersion = http://schemas.dmtf.org/wbem/wsman/1/wsman.xsd
ProductVendor = Microsoft Corporation
ProductVersion = OS: 6.1.7601 SP: 1.0 Stack: 2.0

C:\Windows\system32> winrm get winrm/config/Service
Service
RootSDDL = O:NSG:BAD:P(A;;GA;;;BA)S:P(AU;FA;GA;;;WD)(AU;SA;GWGX;;;WD)
MaxConcurrentOperations = 4294967295
MaxConcurrentOperationsPerUser = 15
EnumerationTimeoutms = 60000
MaxConnections = 25
MaxPacketRetrievalTimeSeconds = 120
AllowUnencrypted = false
Auth
Basic = true
Kerberos = true
Negotiate = true
Certificate = false
CredSSP = true [Source="GPO"]
CbtHardeningLevel = Relaxed
DefaultPorts
HTTP = 5985
HTTPS = 5986
IPv4Filter = * [Source="GPO"]
IPv6Filter = * [Source="GPO"]
EnableCompatibilityHttpListener = false
EnableCompatibilityHttpsListener = false
CertificateThumbprint

Provider works only on Ubuntu 14.04.

Documentation suggests that PowerShell remoting requires only two elements:

  • OMI
  • PowerShell

We also have links to packages for general "Debian" and "RPM":

You can download and install PSRP-Server from following links:

Platform Releases Link
Linux Debian psrp-1.0.0-0.universal.x64.deb
Linux RPM psrp-1.0.0-0.universal.x64.rpm

Unfortunatelly, I managed to get it to work only on Ubuntu 14.04. I've tried CentOS 7.1, but even though OMI/PowerShell work fine, PowerShell remoting over WSMan was not possible. Could you please update docs to highlight current requirements and make sure that package works on other distributions that support OMI/PowerShell?

PowerShell Beta 9 causes a regression in the PSRP omi provider due to the name change to pswh.

See PowerShell/PowerShell#5246

startCoreCLR in coreclrutil.cpp (https://github.com/PowerShell/psl-omi-provider/blob/master/src/coreclrutil.cpp#L191) finds powershell's coreclr binary using the powershell binary. The change in name to pwsh breaks this logic.

$PSVersionTable
Name Value

PSVersion 6.0.0-beta.9
PSEdition Core
GitCommitId v6.0.0-beta.9
OS Linux 4.4.0-97-generic #120-Ubuntu SMP Tue Sep 19 17:28:18 UTC 2017
Platform Unix
PSCompatibleVersions {1.0, 2.0, 3.0, 4.0...}
PSRemotingProtocolVersion 2.3
SerializationVersion 1.1.0.1
WSManStackVersion 3.0

New-PSSession to itself failed

Hi Guru,

New-PSSession to itself failed, I could not find the cause, could you please help? really appericate

PS /root> New-PSSession -Credential $credential -ComputerName 127.0.0.1 -Verbose -Authentication Basic -UseSSL -SessionOption (New-PSSessionOption -SkipCACheck -SkipRevocationCheck -SkipCNCheck)
New-PSSession : [127.0.0.1] Connecting to remote server 127.0.0.1 failed with the following error message : A general error occurred, not covered by a more specific error code. For more information, see the
about_Remote_Troubleshooting Help topic.
At line:1 char:1

  • New-PSSession -Credential $credential -ComputerName 127.0.0.1 -Verbos ...
  •   + CategoryInfo          : OpenError: (System.Manageme....RemoteRunspace:RemoteRunspace) [New-PSSession], PSRemotingTransportException
      + FullyQualifiedErrorId : 1,PSSessionOpenFailed
    

PS /root>

root@pek2-gosv-16-dhcp167:~# sudo service omid status
● omid.service - OMI CIM Server
Loaded: loaded (/lib/systemd/system/omid.service; enabled; vendor preset: enabled)
Active: active (running) since Sat 2017-10-28 09:45:26 UTC; 9min ago
Process: 4175 ExecStop=/opt/omi/bin/omiserver -s (code=exited, status=0/SUCCESS)
Process: 4219 ExecStart=/opt/omi/bin/omiserver -d (code=exited, status=0/SUCCESS)
Process: 4179 ExecStartPre=/opt/omi/bin/support/installssllinks (code=exited, status=0/SUCCESS)
Main PID: 4223 (omiserver)
Tasks: 5 (limit: 512)
Memory: 3.4M
CPU: 362ms
CGroup: /system.slice/omid.service
├─4223 /opt/omi/bin/omiserver -d
├─4224 /opt/omi/bin/omiengine -d --logfilefd 3 --socketpair 9
├─4254 /opt/omi/bin/omiagent 9 10 --destdir / --providerdir /opt/omi/lib --loglevel WARNING
├─4363 /opt/omi/bin/omiagent 9 10 --destdir / --providerdir /opt/omi/lib --loglevel WARNING
└─4378 /opt/omi/bin/omiagent 9 10 --destdir / --providerdir /opt/omi/lib --loglevel WARNING

Oct 28 09:45:26 pek2-gosv-16-dhcp167 systemd[1]: Starting OMI CIM Server...
Oct 28 09:45:26 pek2-gosv-16-dhcp167 systemd[1]: omid.service: PID file /var/opt/omi/run/omiserver.pid not readable (yet?) after start: No such file or direc
Oct 28 09:45:26 pek2-gosv-16-dhcp167 systemd[1]: omid.service: Supervising process 4223 which is not our child. We'll most likely not notice when it exits.
Oct 28 09:45:26 pek2-gosv-16-dhcp167 systemd[1]: Started OMI CIM Server.

root@pek2-gosv-16-dhcp167:~# cat /var/opt/omi/log/omiserver.log
2017/10/28 08:04:52 [1980,1980] ERROR: null(0): EventId=20135 Priority=ERROR NTLM Credentials file does not exist or invalid permissions: null
2017/10/28 08:08:12 [1981,1981] WARNING: null(0): EventId=30107 Priority=WARNING Sock_Read: Error 9
2017/10/28 08:08:12 [1981,1981] WARNING: null(0): EventId=30112 Priority=WARNING Socket: 0xc31c80, Error: 1 while reading header

2017/10/28 08:08:12 [1981,1981] WARNING: null(0): EventId=30214 Priority=WARNING Selector_RemoveHandler: selector=0x5d1fc8, handler=0xc31c80, name=null NOT REGISTERED
2017/10/28 08:08:14 [2571,2571] ERROR: null(0): EventId=20135 Priority=ERROR NTLM Credentials file does not exist or invalid permissions: null
2017/10/28 08:32:40 [2572,2572] WARNING: null(0): EventId=30107 Priority=WARNING Sock_Read: Error 9
2017/10/28 08:32:40 [2572,2572] WARNING: null(0): EventId=30112 Priority=WARNING Socket: 0x15102e0, Error: 1 while reading header

2017/10/28 08:32:40 [2572,2572] WARNING: null(0): EventId=30214 Priority=WARNING Selector_RemoveHandler: selector=0x5d1fc8, handler=0x15102e0, name=null NOT REGISTERED
2017/10/28 09:37:50 [2572,2572] WARNING: null(0): EventId=30107 Priority=WARNING Sock_Read: Error 9
2017/10/28 09:37:50 [2572,2572] WARNING: null(0): EventId=30112 Priority=WARNING Socket: 0x1513350, Error: 1 while reading header

2017/10/28 09:37:50 [2572,2572] WARNING: null(0): EventId=30214 Priority=WARNING Selector_RemoveHandler: selector=0x5d1fc8, handler=0x1513350, name=null NOT REGISTERED
2017/10/28 09:39:30 [3927,3927] ERROR: null(0): EventId=20135 Priority=ERROR NTLM Credentials file does not exist or invalid permissions: null
2017/10/28 09:40:10 [3998,3998] ERROR: null(0): EventId=20135 Priority=ERROR NTLM Credentials file does not exist or invalid permissions: null
2017/10/28 09:42:09 [4093,4093] ERROR: null(0): EventId=20135 Priority=ERROR NTLM Credentials file does not exist or invalid permissions: null
2017/10/28 09:45:26 [4223,4223] ERROR: null(0): EventId=20135 Priority=ERROR NTLM Credentials file does not exist or invalid permissions: null
root@pek2-gosv-16-dhcp167:~#

Issue with connecting from SLES to Windows

Hi,
I'm trying to connect from a SLES-12 machine to a windows machine. Have installed powershell, omi and psrp. Trying to connect using ntlm authentication. I followed the steps given in the link for ntlm setup - https://github.com/Microsoft/omi/blob/master/Unix/doc/setup-ntlm-omi.md. Tried this on Ubuntu as well as SLES. On Ubuntu, it is working fine. I am able to connect to the windows machine. The gssntlm library is not available in SLES and so had to build it from the link - https://github.com/simo5/gss-ntlmssp.
However, I'm getting the below error in case of SLES.

**Enter-PSSession : Connecting to remote server xx.xx.xx.xx failed with the following error message : acquiring creds with username only failed An invalid name was supplied SPNEGO cannot find mechanisms to negotiate For more information, see the about_Remote_Troubleshooting Help topic.
At line:1 char:1

  • Enter-PSSession -ComputerName xx.xx.xx.xx -Credential $cred -Authent ...
  • CategoryInfo : InvalidArgument: (xx.xx.xx.xx:String) [Enter-PSSession], PSRemotingTransportException
  • FullyQualifiedErrorId : CreateRemoteRunspaceFailed**

I used the following command on both Ubuntu and SLES to connect to the windows machine.
Enter-PSSession -ComputerName xx.xx.xx.xx -Credential $cred -Authentication negotiate
Please let me know what exactly the issue is or if there is anything wrong in the way I'm using this and also how this can be sorted.

Thank you.

Arch Linux repos

I think so many more people would use it (including me) if they could just type pacaur -S psrp or something. Correctly I have to compile 3 different things

hostname setting in ntlm file doesn't affect remoting result

Steps:

  1. on the server client: vi /etc/opt/omi/.creds/ntlm and give a hostname which doesn't exist at all like 'wronghostname:root:password01'.
  2. on the client try to remote to this server with omicli command.

-u with hostname setting in ntlm file:
/opt/omi/bin/omicli id -u wronghostname\root -p 'password01' --auth NegoWithCreds --hostname psl-cent7x64-01 --port 5986 --encryption https

-u with username without hostname:
/opt/omi/bin/omicli id -u root -p 'password01' --auth NegoWithCreds --hostname psl-cent7x64-01 --port 5986 --encryption https

Expected:
The remote should fail.

Acutal Result:
Both remote connections succeed.

root@psl-cent7x64-02  #  /opt/omi/bin/omicli id  -u psl-cent7x64-0\\root -p 'password01' --auth NegoWithCreds --hostname psl-cent7x64-01 --port 5986 --encryption https
instance of OMI_Identify
{
    InstanceID=2FDB5542-5896-45D5-9BE9-DC04430AAABE
    SystemName=psl-cent7x64-01
    ProductName=OMI
    ProductVendor=Microsoft
    ProductVersionMajor=1
    ProductVersionMinor=2
    ProductVersionRevision=0
    ProductVersionString=1.2.0-35
    Platform=LINUX_X86_64_GNU
    OperatingSystem=LINUX
    Architecture=X86_64
    Compiler=GNU
    ConfigPrefix=GNU
    ConfigLibDir=/opt/omi/lib
    ConfigBinDir=/opt/omi/bin
    ConfigIncludeDir=/opt/omi/include
    ConfigDataDir=/opt/omi/share
    ConfigLocalStateDir=/var/opt/omi
    ConfigSysConfDir=/etc/opt/omi/conf
    ConfigProviderDir=/etc/opt/omi/conf
    ConfigLogFile=/var/opt/omi/log/omiserver.log
    ConfigPIDFile=/var/opt/omi/run/omiserver.pid
    ConfigRegisterDir=/etc/opt/omi/conf/omiregister
    ConfigSchemaDir=/opt/omi/share/omischema
    ConfigNameSpaces={root-omi, interop}
}

root@psl-cent7x64-02 # /opt/omi/bin/omicli id -u root -p 'password01' --auth NegoWithCreds --hostname psl-cent7x64-01 --port 5986 --encryption https
instance of OMI_Identify
{
InstanceID=2FDB5542-5896-45D5-9BE9-DC04430AAABE
SystemName=psl-cent7x64-01
ProductName=OMI
ProductVendor=Microsoft
ProductVersionMajor=1
ProductVersionMinor=2
ProductVersionRevision=0
ProductVersionString=1.2.0-35
Platform=LINUX_X86_64_GNU
OperatingSystem=LINUX
Architecture=X86_64
Compiler=GNU
ConfigPrefix=GNU
ConfigLibDir=/opt/omi/lib
ConfigBinDir=/opt/omi/bin
ConfigIncludeDir=/opt/omi/include
ConfigDataDir=/opt/omi/share
ConfigLocalStateDir=/var/opt/omi
ConfigSysConfDir=/etc/opt/omi/conf
ConfigProviderDir=/etc/opt/omi/conf
ConfigLogFile=/var/opt/omi/log/omiserver.log
ConfigPIDFile=/var/opt/omi/run/omiserver.pid
ConfigRegisterDir=/etc/opt/omi/conf/omiregister
ConfigSchemaDir=/opt/omi/share/omischema
ConfigNameSpaces={root-omi, interop}
}

"TERM environment variable not set" when typing in "clear"

After setting up PSRP on Linux, I remote connected from windows and issued the clear command. When I do this the screen does not clear and I am given the error "TERM environment variable not set.". It is a minor thing, but I am interested to find out if there is a way to make the clear command over PSRP to Linux.

Disconnect-PSSession from Ubuntu16x64 to Cent7 will fail

$password=convertto-securestring "***" -asplaintext -force
$pscred=New-Object -TypeName System.Management.Automation.PSCredential -ArgumentList "root",$password
$session=New-PSSessionOption -SkipCACheck -SkipRevocationCheck -SkipCNCheck
New-PSSession -ComputerName "psl64-cent7-01" -Credential $pscred -Authentication Basic -UseSSL -SessionOption $session
Get-PSSession|Disconnect-PSSession
Disconnect-PSSession : Disconnect-PSSession operation failed for runspace Id = 
805f151a-97f0-4124-96fd-e9fa90d42270 for the following reason: The 
disconnection operation is not supported on the remote computer. To support 
disconnecting, the remote computer must be running Windows PowerShell 3.0 or a 
later version of Windows PowerShell.
At line:1 char:15
+ Get-PSSession|Disconnect-PSSession
+               ~~~~~~~~~~~~~~~~~~~~
    + CategoryInfo          : InvalidOperation: ([PSSession]WinRM1:PSSession)  
   [Disconnect-PSSession], RuntimeException
    + FullyQualifiedErrorId : PSSessionDisconnectFailed,Microsoft.PowerShell.C 
   ommands.DisconnectPSSessionCommand

make "/bin/ld cannot find -lpam / -lssl / -lcrypto"

I'm attempting to compile the psl-omi-provider on CentOS 7.3. When I clone down the repository and run either "make debug" or "make release", I get the following error in the "Performing Building OMI" section:

========================= Performing Building OMI
( cd /home/james/downloads/psl-omi-provider/omi/Unix; make -f build.mak )
make[2]: Entering directory /home/james/downloads/psl-omi-provider/omi/Unix' make[3]: Entering directory /home/james/downloads/psl-omi-provider/omi/Unix/chkshlib'
mkdir -p /home/james/downloads/psl-omi-provider/omi/Unix/output/bin
g++ -o /home/james/downloads/psl-omi-provider/omi/Unix/output/bin/chkshlib /home/james/downloads/psl-omi-provider/omi/Unix/output/obj/chkshlib/chkshlib.o -L/home/james/downloads/psl-omi-provider/omi/Unix/output/lib -L -lpthread -ldl -lpam -lssl -lcrypto -Wl,-rpath=/opt/omi/lib
/bin/ld: cannot find -lpam
/bin/ld: cannot find -lssl
/bin/ld: cannot find -lcrypto
collect2: error: ld returned 1 exit status
make[3]: *** [/home/james/downloads/psl-omi-provider/omi/Unix/output/bin/chkshlib] Error 1
make[3]: Leaving directory /home/james/downloads/psl-omi-provider/omi/Unix/chkshlib' make[2]: *** [all] Error 2 make[2]: Leaving directory /home/james/downloads/psl-omi-provider/omi/Unix'
make[1]: *** [all] Error 2
make[1]: Leaving directory `/home/james/downloads/psl-omi-provider/omi/Unix'
make: *** [release] Error 2

The SSL certificate is expired

When I do enter-pssession from windows powershell I see below error, Is there any documentation for this.
My centos version is CentOS Linux release 7.5.1804 (Core)

Enter-PSSession : Connecting to remote server centos.vcloud-lab.com failed with the following error message : The
server certificate on the destination computer (centos.vcloud-lab.com:5986) has the following errors:
The SSL certificate is expired. For more information, see the about_Remote_Troubleshooting Help topic.
At line:1 char:1
Enter-PSSession -ComputerName centos.vcloud-lab.com -Credential $cred ...
CategoryInfo : InvalidArgument: (centos.vcloud-lab.com:String) [Enter-PSSession], PSRemotingTransportEx
ception
FullyQualifiedErrorId : CreateRemoteRunspaceFailed

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.