powershell remote import module error -
i have problem code
invoke-command -computername $csc_server -scriptblock { import-module ("c:\build_v.6.1.0.9\tools\commoncomponents.buildcommands.dll") }
error:
could not load file or assembly "file: /// c: \ build v.6.1.0.9 \ tools \ commoncomponents.buildcommands.dll" or 1 of dependent components. assembly created in later version of runtime current, , can not loaded.
when go server via rdp , try load module ok.
how fix problem?
upd
> invoke-command -computername $csc_server -scriptblock {$psversiontable} name value ---- ----- serializationversion 1.1.0.1 psremotingprotocolversion 2.1 pscompatibleversions {1.0, 2.0} clrversion 2.0.50727.5420 buildversion 6.1.7601.17514 psversion 2.0 wsmanstackversion 2.0
and same via local session on remove server
> $psversiontable name value ---- ----- psversion 2.0 pscompatibleversions {1.0, 2.0} buildversion 6.1.7601.17514 clrversion 4.0.30319.17929 wsmanstackversion 2.0 psremotingprotocolversion 2.1 serializationversion 1.1.0.1
now see difference in clrversion. powershell remoting uses clr version 2.0. reason behavior? , how change version 4.0?
Comments
Post a Comment