import-pssession error

J

Juha

I have two WinXP/SP3 machines running Powershell 2 with the
executionpolicy set to unrestricted and psremoting enabled.

I can create a session to a machine and enter a session but when I try
to import one then I get the below:

$7=new-pssession -comp machinename.domain
import-pssession -session $7 -allowclobber

Import-PSSession : Proxy creation has been skipped for '%' command,
because Pow
erShell couldn't verify its name as safe.
At line:1 char:17
+ import-pssession <<<< -session $7 -allowclobber
+ CategoryInfo : InvalidData: (:) [Import-PSSession],
InvalidOper
ationException
+ FullyQualifiedErrorId :
ErrorSkippedUnsafeCommandName,Microsoft.PowerShe
ll.Commands.ImportPSSessionCommand
Import-PSSession : Proxy creation has been skipped for '?' command,
because Pow
erShell couldn't verify its name as safe.
At line:1 char:17
+ import-pssession <<<< -session $7 -allowclobber
+ CategoryInfo : InvalidData: (:) [Import-PSSession],
InvalidOper
ationException
+ FullyQualifiedErrorId :
ErrorSkippedUnsafeCommandName,Microsoft.PowerShe
ll.Commands.ImportPSSessionCommand
WARNING: Some imported command names include unapproved verbs which
might make
them less discoverable. Use the Verbose parameter for more detail or
type
Get-Verb to see the list of approved verbs.

ModuleType Name ExportedCommands
---------- ---- ----------------
Script tmp_80e5d07d-ea66-4a1b... {Register-ObjectEvent, Clear-
Variable, ...


Similarly when I try to invoke a command I get:

invoke-command -session $7 -scriptblock{get-host}

Cannot bind parameter 'Session'. Cannot convert the
"System.Management.Automati
on.Runspaces.PSSession" value of type
"Deserialized.System.Management.Automatio
n.Runspaces.PSSession" to type
"System.Management.Automation.Runspaces.PSSessio
n".
+ CategoryInfo : InvalidArgument: (:) [Invoke-Command],
Parameter
BindingException
+ FullyQualifiedErrorId :
CannotConvertArgumentNoMessage,Microsoft.PowerSh
ell.Commands.InvokeCommandCommand

Can anyone help?
 

My Computer

Top