SCVMM 2019 connecti...
 
Notifications
Clear all

SCVMM 2019 connection issue

6 Posts
3 Users
0 Reactions
937 Views
Posts: 6
Topic starter
(@manuan)
Active Member
Joined: 3 years ago

Hello, SCVMM2019 is compliance ?
I try connect, and I have this issue :

[6/24/2021 5:18:01 PM] ERROR: HostedSolution GetSwitches
System.Management.Automation.CmdletInvocationException: The following error occurred while loading the extended type data file: , C:\Program Files\Microsoft System Center\Virtual Machine Manager\bin\virtualmachinemanager.types.ps1xml(163) : Erreur : Type [Microsoft.SystemCenter.VirtualMachineManager.Cmdlets.VMConverter] introuvable.
, C:\Program Files\Microsoft System Center\Virtual Machine Manager\bin\virtualmachinemanager.types.ps1xml(62) : Erreur : Type [Microsoft.SystemCenter.VirtualMachineManager.Cmdlets.TemplateConverter] introuvable.
---> System.Management.Automation.RuntimeException: The following error occurred while loading the extended type data file: , C:\Program Files\Microsoft System Center\Virtual Machine Manager\bin\virtualmachinemanager.types.ps1xml(163) : Erreur : Type [Microsoft.SystemCenter.VirtualMachineManager.Cmdlets.VMConverter] introuvable.
, C:\Program Files\Microsoft System Center\Virtual Machine Manager\bin\virtualmachinemanager.types.ps1xml(62) : Erreur : Type [Microsoft.SystemCenter.VirtualMachineManager.Cmdlets.TemplateConverter] introuvable.

at System.Management.Automation.Runspaces.InitialSessionState.ThrowTypeOrFormatErrors(String resourceString, String errorMsg, String errorId)
at System.Management.Automation.Runspaces.InitialSessionState.UpdateTypes(ExecutionContext context, Boolean updateOnly)
at System.Management.Automation.Runspaces.InitialSessionState.Bind_UpdateTypes(ExecutionContext context, Boolean updateOnly)
at System.Management.Automation.Runspaces.InitialSessionState.Bind(ExecutionContext context, Boolean updateOnly, PSModuleInfo module, Boolean noClobber, Boolean local)
at System.Management.Automation.Runspaces.InitialSessionState.Bind(ExecutionContext context, Boolean updateOnly)
at Microsoft.PowerShell.Commands.ModuleCmdletBase.LoadModuleManifest(String moduleManifestPath, ExternalScriptInfo manifestScriptInfo, Hashtable data, Hashtable localizedData, ManifestProcessingFlags manifestProcessingFlags, Version minimumVersion, Version maximumVersion, Version requiredVersion, Nullable`1 requiredModuleGuid, ImportModuleOptions& options, Boolean& containedErrors)
--- End of inner exception stack trace ---
at System.Management.Automation.Runspaces.PipelineBase.Invoke(IEnumerable input)
at System.Management.Automation.PowerShell.Worker.ConstructPipelineAndDoWork(Runspace rs, Boolean performSyncInvoke)
at System.Management.Automation.PowerShell.Worker.CreateRunspaceIfNeededAndDoWork(Runspace rsToUse, Boolean isSync)
at System.Management.Automation.PowerShell.CoreInvokeHelper[TInput,TOutput](PSDataCollection`1 input, PSDataCollection`1 output, PSInvocationSettings settings)
at System.Management.Automation.PowerShell.CoreInvoke[TInput,TOutput](PSDataCollection`1 input, PSDataCollection`1 output, PSInvocationSettings settings)
at System.Management.Automation.PowerShell.Invoke(IEnumerable input, PSInvocationSettings settings)
at System.Management.Automation.Runspaces.InitialSessionState.ProcessImportModule(Runspace initializedRunspace, String name, PSModuleInfo moduleInfoToLoad, String path, HashSet`1 publicCommands)
at System.Management.Automation.Runspaces.InitialSessionState.ProcessImportModule(Runspace initializedRunspace, IEnumerable moduleList, String path, HashSet`1 publicCommands, HashSet`1 unresolvedCmdsToExpose)
at System.Management.Automation.Runspaces.InitialSessionState.BindRunspace(Runspace initializedRunspace, PSTraceSource runspaceInitTracer)
at System.Management.Automation.Runspaces.LocalRunspace.DoOpenHelper()
at System.Management.Automation.Runspaces.RunspaceBase.CoreOpen(Boolean syncCall)
at SolidCP.Providers.Virtualization.PowerShellManager.OpenRunspace()
at SolidCP.Providers.Virtualization.HyperVvmm.get_PowerShell()
at SolidCP.Providers.Virtualization.HyperVvmm.GetSwitches(String computerName, String type)

5 Replies
Posts: 6
Topic starter
(@manuan)
Active Member
Joined: 3 years ago

Hello, nobody ?

Reply
1 Reply
(@berkut)
Joined: 7 years ago

Estimable Member
Posts: 110

@manuan

Hello,

As I know SCVMM not works at all. 

Reply
Posts: 6
Topic starter
(@manuan)
Active Member
Joined: 3 years ago

I am going completely crazy.
In order to debug I do tests of powershell command to SCVMM.
In order to simplify the test with IIS, I create a powershell session with authentication in order to be certain of the user.
Even in this case VMM refuses the connection whereas with a console I have no problem.
Powershell / VMM must identify something other than login and block when it comes from IIS.

Sample on IIS :

protected void Page_Load(object sender, EventArgs e)
{
Runspace runspace = RunspaceFactory.CreateRunspace();
runspace.Open();

Pipeline pipeline = runspace.CreatePipeline();
string scripttext = "$secpasswd = ConvertTo-SecureString 'password' -AsPlainText –Force";
string scripttext1 = @"$mycreds = New-object -typename System.Management.Automation.PSCredential('login',$secpasswd)";
string scripttext2 = "$s = New-PSSession -ComputerName scvmm -Credential $mycreds";
string scripttext3 = "Import-PSSession -Session $s";
string scripttext4 = "Import-Module virtualmachinemanager";
string scripttext5 = "Get-SCLogicalNetwork";

pipeline.Commands.AddScript(scripttext);
pipeline.Commands.AddScript(scripttext1);
pipeline.Commands.AddScript(scripttext2);
pipeline.Commands.AddScript(scripttext3);
pipeline.Commands.AddScript(scripttext4);
pipeline.Commands.AddScript(scripttext5);

Collection<PSObject> results = pipeline.Invoke();

runspace.Close();
}

Sample on Console :

static void Main(string[] args)
{


Runspace runspace = RunspaceFactory.CreateRunspace();
runspace.Open();

Pipeline pipeline = runspace.CreatePipeline();
string scripttext = "$secpasswd = ConvertTo-SecureString 'password' -AsPlainText –Force";
string scripttext1 = @"$mycreds = New-object -typename System.Management.Automation.PSCredential('login',$secpasswd)";
string scripttext2 = "$s = New-PSSession -ComputerName scvmm -Credential $mycreds";
string scripttext3 = "Import-PSSession -Session $s";
string scripttext4 = "Import-Module virtualmachinemanager";
string scripttext5 = "Get-SCLogicalNetwork";

pipeline.Commands.AddScript(scripttext);
pipeline.Commands.AddScript(scripttext1);
pipeline.Commands.AddScript(scripttext2);
pipeline.Commands.AddScript(scripttext3);
pipeline.Commands.AddScript(scripttext4);
pipeline.Commands.AddScript(scripttext5);

Collection<PSObject> results = pipeline.Invoke();

foreach (var item in results)
{
Console.WriteLine(item.BaseObject.ToString());
};
Console.ReadLine();

runspace.Close();

}


Reply
1 Reply
(@manuan)
Joined: 3 years ago

Active Member
Posts: 6

english message : You cannot access Virtual Machine Manager server. Ensure that your account is a member of a valid user role, and then try the operation again.

Reply
Posts: 1457
Admin
(@trobinson)
Noble Member
Joined: 9 years ago

Hello,

Currently the SCVMM provider is no longer working and has not been updated for some time. Its recommended to use the HyperV provider.

Regards,

Trevor

Reply
Share: