Albert Widjaja
asked on
Unable to find type [ordered]: make sure that the assembly containing this type is loaded.
Folks,
I'm trying to run a Powershell script which used the ordered list, but somehow it failed on my Windows 7 laptop with the below error message:
I'm using PowerGUI to execute all powershell and the below is the output of the versions:
Code:
Result:
I'm sure that I have installed the .NET Framework 4.0 (Windows6.1-KB2819745-x64- MultiPkg.m su) but somehow the code is still stuck with no chance to get it running for the first time.
Any help would be greatly appreciated.
Thanks.
I'm trying to run a Powershell script which used the ordered list, but somehow it failed on my Windows 7 laptop with the below error message:
Unable to find type [ordered]: make sure that the assembly containing this type is loaded.
I'm using PowerGUI to execute all powershell and the below is the output of the versions:
Code:
gci 'HKLM:\SOFTWARE\Microsoft\NET Framework Setup\NDP' | sort pschildname -des | foreach-object {$_.name; $_.GetValue("Version");}
Result:
HKEY_LOCAL_MACHINE\SOFTWARE\Microsof t\NET Framework Setup\NDP\v4.0
HKEY_LOCAL_MACHINE\SOFTWARE\Microsof t\NET Framework Setup\NDP\v4
HKEY_LOCAL_MACHINE\SOFTWARE\Microsof t\NET Framework Setup\NDP\v3.5
3.5.30729.5420
HKEY_LOCAL_MACHINE\SOFTWARE\Microsof t\NET Framework Setup\NDP\v3.0
3.0.30729.5420
HKEY_LOCAL_MACHINE\SOFTWARE\Microsof t\NET Framework Setup\NDP\v2.0.50727
2.0.50727.5420
HKEY_LOCAL_MACHINE\SOFTWARE\Microsof t\NET Framework Setup\NDP\CDF
PS C:\Users\Administrator\Documents> $PSVersionTable
Name Value
---- -----
PSVersion 2.0
PSCompatibleVersions {1.0, 2.0}
BuildVersion 6.1.7601.17514
PSRemotingProtocolVersion 2.1
WSManStackVersion 2.0
CLRVersion 4.0.30319.1026
SerializationVersion 1.1.0.1
PS C:\Users\Administrator\Documents> Get-PowerCLIVersion
PowerCLI Version
----------------
VMware vSphere PowerCLI 5.8 Release 1 build 2057893
---------------
Snapin Versions
---------------
VMWare AutoDeploy PowerCLI Component 5.5 build 1983942
VMWare ImageBuilder PowerCLI Component 5.5 build 1983942
VMware License PowerCLI Component 5.5 build 1265954
VMware Storage PowerCLI Component 5.8 build 2057894
VMware VDS PowerCLI Component 5.8 build 2031581
VMware vSphere PowerCLI Component 5.8 build 2031581
I'm sure that I have installed the .NET Framework 4.0 (Windows6.1-KB2819745-x64-
Any help would be greatly appreciated.
Thanks.
SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
Exchange Server 2010, for all types of server deployment including workstation with Exchange Management Console.
So I'm skipping .NET Fx 3.0 but somehow I still don;t understand as to why I cannot use or install .NET Fx 4.0 ?
I have rebooted my laptop couple of times already but it is still showing as PS 2.0 not yet 4.0 ?
So I'm skipping .NET Fx 3.0 but somehow I still don;t understand as to why I cannot use or install .NET Fx 4.0 ?
I have rebooted my laptop couple of times already but it is still showing as PS 2.0 not yet 4.0 ?
SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
Ok, after installing the .NET Fx 4.5.2 NDP452-KB2901907-x86-x64-AllOS-ENU.exe, now my Exchange management console broke with the following error:
as per this website: http://www.powershellserver.com/powershell-server-cannot-load-windows-powershell-snap-in-microsoft-exchange-management-powershell-e2010/
it says I have to uninstall the .NET Fx
Cannot load Windows PowerShell snap-in Microsoft.Exchange.Management.PowerS hell.E2010 because of the following error: The type initializer for 'Microsoft.Exchange.Data.D irectory.G lobals' threw an exception.
as per this website: http://www.powershellserver.com/powershell-server-cannot-load-windows-powershell-snap-in-microsoft-exchange-management-powershell-e2010/
it says I have to uninstall the .NET Fx
SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
But I cannot install the powershell 3.0 because it would break my Exchange Server management console in my Windows 7.
I have already installed the Windows6.1-KB2819745-x64-M
what can I do to run it under PS 4.0 ?