winrm
4 TopicsThe SSL certificate contains a common name (CN) that does not match the hostname.
I'm after a bit of assitance for the WAC 2025 deployed in Azure. The fundamentals are setup, and I can add standalone servers, however when I add the hyper v cluster or the nodes underneath individually, and connect, it throws up the following error. There's a self signed cert bound to the cluster listener and verified working, but it still throws the below. I'm not sure what i'm missing. The cert is also in the personal store of the local nodes with their SAN within that same certificate bound to the listener. cluster.domain.com node1.domain.com node2.domain.com Connecting to remote server name.domain.com failed with the following error message : The server certificate on the destination computer (name.domain.com:5986) has the following errors: The SSL certificate contains a common name (CN) that does not match the hostname. For more information, see the about_Remote_Troubleshooting Help topic.156Views0likes0CommentsGetting all virtual machines in a Hyper-V cluster using Python and WinRM
Hello, I am trying to use Python and WinRM to retrieve a list of all virtual machines in a Hyper-V cluster. I have a PowerShell script that works to retrieve the virtual machines owned by the current node, but I am having trouble modifying it to retrieve all virtual machines in the cluster. Here's the current script that retrieves the virtual machines owned by the current node: # Create a PowerShell session on the host machine session = winrm.Session(host, auth=(username, password),transport='ntlm') # Define the PowerShell command to retrieve the list of virtual machines in the cluster ps_script = """ $nodes = Get-ClusterNode Write-Output $nodes $vm_list = Get-ClusterGroup -Cluster $env:computername | Where-Object {$_.GroupType -eq 'VirtualMachine' -and $_.OwnerNode.Name -in $nodes.Name} | Get-VM $vm_names = $vm_list.Name Write-Output $vm_names """ # Execute the PowerShell command and retrieve the output result = session.run_ps(ps_script) if result.status_code == 0: # Parse the output to get the list of virtual machines vm_info = result.std_out.decode('utf-8').strip() # Print the list of virtual machines print(vm_info) else: # Print the full error message print("Error message: " + result.std_err.decode('utf-8').strip()) Can anyone help me modify this script to retrieve all virtual machines in the cluster, regardless of which node owns them? Thank you in advance for your help!2.3KViews0likes2CommentsWinRM to Azure AD Joined & Intune Managed Devices
Has anyone had any success connecting to remote hosts that are not on a corporate network, but are Azure AD joined and are Intune MDM managed? I know that Microsoft added this capability to https://docs.microsoft.com/en-us/windows/client-management/connect-to-remote-aadj-pc, but not sure about WinRM. Thanks in advance!2.3KViews0likes0Comments