Home Dashboard Directory Help
Search

enter-pssession & get-childitem in powershell3 by didierlux


Status: 

Active


1
0
Sign in
to vote
Type: Bug
ID: 781011
Opened: 3/8/2013 7:58:46 AM
Access Restriction: Public
0
Workaround(s)
view
0
User(s) can reproduce this bug

Description

get-childitem does not work with specific parameters in a remote pssession.

Client is: windows8
Server: windows 2008 r2 with powershell3

1) enter-pssession somehost -credential $cred

2)
[somehost]: PS C:\> Get-ChildItem -Attributes !Directory+!System+Encrypted, !Directory+!System+Compressed
Cannot bind parameter 'Attributes'. Cannot convert the "System.Collections.ArrayList" value of type "System.Collections.ArrayList" to type
"System.Management.Automation.FlagsExpression`1[System.IO.FileAttributes]".
    + CategoryInfo         : InvalidArgument: (:) [Get-ChildItem], ParameterBindingException
    + FullyQualifiedErrorId : CannotConvertArgumentNoMessage,Microsoft.PowerShell.Commands.GetChildItemCommand

3)
[somehost]: PS C:\> $host
Name             : ServerRemoteHost
Version         : 1.0.0.0
InstanceId     : eebb6869-992a-4b6c-b7cb-f5faa754c214
UI             : System.Management.Automation.Internal.Host.InternalHostUserInterface
CurrentCulture : en-US
CurrentUICulture : en-US
PrivateData     :
IsRunspacePushed :
Runspace         :
Details
Sign in to post a comment.
Sign in to post a workaround.