unable to get the total file count details from the directory and sub directory.
$session.ExecuteCommand("ls -l").output
the above mentioned code gives me error.
##Error##
PS F:\abc> $session.ExecuteCommand("ls -l")
Exception calling "ExecuteCommand" with "1" argument(s): "Element session@0 already read
to the end"
At line:1 char:1
+ $session.ExecuteCommand("ls -l")
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+ CategoryInfo : NotSpecified: (:) [], MethodInvocationException
+ FullyQualifiedErrorId : InvalidOperationException
the above mentioned code gives me error.
##Error##
PS F:\abc> $session.ExecuteCommand("ls -l")
Exception calling "ExecuteCommand" with "1" argument(s): "Element session@0 already read
to the end"
At line:1 char:1
+ $session.ExecuteCommand("ls -l")
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+ CategoryInfo : NotSpecified: (:) [], MethodInvocationException
+ FullyQualifiedErrorId : InvalidOperationException