-
Notifications
You must be signed in to change notification settings - Fork 8.2k
Closed
Labels
Issue-Questionideally support can be provided via other mechanisms, but sometimes folks do open an issue to get aideally support can be provided via other mechanisms, but sometimes folks do open an issue to get aOS-LinuxResolution-No ActivityIssue has had no activity for 6 months or moreIssue has had no activity for 6 months or more
Description
Steps to reproduce
What do i need to do next?
Export-PSSession -session $session -OutputModule s -Force -CommandName ‘Get-winEvent’ -AllowClobber -CommandType all
Remove-PSSession -Session $session
import-module s -vb
get-winevent -FilterHashtable @{ LogName='Security'; StartTime=$Date; Id='4625' }
Expected behavior
Actual behavior
error
Environment data
**********************
PowerShell transcript start
Start time: 20200514100345
Username: localhost\root
RunAs User: localhost\root
Configuration Name:
Machine: localhost (Unix 4.9.112.0)
Host Application: /root/.powershell-daily/pwsh.dll
Process ID: 30283
PSVersion: 7.1.0-daily.20200501
PSEdition: Core
GitCommitId: 7.1.0-daily.20200501
OS: Linux 4.9.112-perf #1 SMP PREEMPT Mon Jan 7 10:46:47 KST 2019
Platform: Unix
PSCompatibleVersions: 1.0, 2.0, 3.0, 4.0, 5.0, 5.1.10032.0, 6.0.0, 6.1.0, 6.2.0, 7.0.0, 7.1.0
PSRemotingProtocolVersion: 2.3
SerializationVersion: 1.1.0.1
WSManStackVersion: 3.0
**********************
Transcript started, output file is /root/PowerShell_transcript.localhost.dgpP9ud7.20200514100345.txt
PS sh> CommandInvocation(Write-Verbose): "Write-Verbose"
>> ParameterBinding(Write-Verbose): name="Message"; value="Command is not a simple pipeline and cannot be batched."
PS sh> $session=new-PSSession -HostName 167.179.zxx -Port xxx -UserName administrator
PS sh> Export-PSSession -session $session -OutputModule s -Force -CommandName ‘get-process’ -AllowClobber -CommandType all
Directory: /root/.local/share/powershell/Modules/s
Mode LastWriteTime Length Name
---- ------------- ------ ----
----- 2020/5/14 上午10:04 93 �[38;2;210;105;30ms.format.ps1xml�[0m
----- 2020/5/14 上午10:04 619 �[38;2;210;105;30ms.psd1�[0m
----- 2020/5/14 上午10:04 11890 �[38;2;0;191;255ms.psm1�[0m
PS sh> Remove-PSSession -Session $session
PS sh> import-module s -vb
VERBOSE: Loading module from path '/root/.local/share/powershell/Modules/s/s.psd1'.
VERBOSE: Importing function 'Get-Process'.
PS sh> get-process
Creating a new session for implicit remoting of "Get-Process" command...
PS sh> TerminatingError(New-PSSessionOption): "A parameter cannot be found that matches parameter name 'Culture'."
>> TerminatingError(New-PSSessionOption): "A parameter cannot be found that matches parameter name 'Culture'."
>> TerminatingError(Get-PSImplicitRemotingSession): "A parameter cannot be found that matches parameter name 'Culture'."
>> TerminatingError(): "Exception calling "GetSteppablePipeline" with "1" argument(s): "A parameter cannot be found that matches parameter name 'Culture'.""
>> TerminatingError(): "Exception calling "GetSteppablePipeline" with "1" argument(s): "A parameter cannot be found that matches parameter name 'Culture'.""
Exception calling "GetSteppablePipeline" with "1" argument(s): "A parameter cannot be found that matches parameter name 'Culture'."
�[91mParentContainsErrorRecordException: �[0m/root/.local/share/powershell/Modules/s/s.psm1:309
�[96mLine |
�[96m 309 | �[0m �[96m$steppablePipeline = $scriptCmd.GetSteppablePipeline($myI�[0m …
�[96m | �[91m ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
�[91m�[96m | �[91mException calling "GetSteppablePipeline" with "1"
�[96m | �[91margument(s): "A parameter cannot be found that
�[96m | �[91mmatches parameter name 'Culture'."
�[0m
PS sh> Stop-Transcript
**********************
PowerShell transcript end
End time: 20200514100452
**********************
PS sh> invoke-command -Session $session {[cultureinfo]::currentculture|fl}
Parent : zh-Hans
LCID : 2052
KeyboardLayoutId : 2052
Name : zh-CN
IetfLanguageTag : zh-CN
DisplayName : 中文(简体,中国)
NativeName : 中文(中国)
EnglishName : Chinese (Simplified, China)
TwoLetterISOLanguageName : zh
ThreeLetterISOLanguageName : zho
ThreeLetterWindowsLanguageName : CHS
CompareInfo : CompareInfo - zh-CN
TextInfo : TextInfo - zh-CN
IsNeutralCulture : False
CultureTypes : SpecificCultures, InstalledWin32Cult
ures
NumberFormat : System.Globalization.NumberFormatInf
o
DateTimeFormat : System.Globalization.DateTimeFormatI
nfo
Calendar : System.Globalization.GregorianCalend
ar
OptionalCalendars : {System.Globalization.GregorianCalen
dar}
UseUserOverride : True
IsReadOnly : True
PS sh> [cultureinfo]::currentculture|fl
Parent : zh
LCID : 2052
KeyboardLayoutId : 2052
Name : zh-CN
IetfLanguageTag : zh-CN
DisplayName : 中文(中国)
NativeName : 中文(中国)
EnglishName : Chinese (China)
TwoLetterISOLanguageName : zh
ThreeLetterISOLanguageName : zho
ThreeLetterWindowsLanguageName : CHS
CompareInfo : CompareInfo - zh-CN
TextInfo : TextInfo - zh-CN
IsNeutralCulture : False
CultureTypes : SpecificCultures
NumberFormat : System.Globalization.NumberFormatInf
o
DateTimeFormat : System.Globalization.DateTimeFormatI
nfo
Calendar : System.Globalization.GregorianCalend
ar
OptionalCalendars : {System.Globalization.GregorianCalen
dar}
UseUserOverride : True
IsReadOnly : TrueReactions are currently unavailable
Metadata
Metadata
Assignees
Labels
Issue-Questionideally support can be provided via other mechanisms, but sometimes folks do open an issue to get aideally support can be provided via other mechanisms, but sometimes folks do open an issue to get aOS-LinuxResolution-No ActivityIssue has had no activity for 6 months or moreIssue has had no activity for 6 months or more