Wednesday, April 20, 2011

Home /Active Directory /Hyper-V /Hyper-V Auto Protection /Microsoft /PowerShell /PowerShell Profile /Virtual Server /Windows / Identify the Physical Host of a Virtual Server – Updated

Identify the Physical Host of a Virtual Server – Updated

This PowerShell script can be used to identify the Physical host name of a Virtual server. You can run this script from a remote machine.  This is an update to one of one old scripts - http://portal.sivarajan.com/2010/01/identify-physical-host-of-virtual.html

Note: This is script is only works on Microsoft virtual/Hyper-v servers and products. If have you some other virtualization solution, the result may not be accurate.

Input - Servers.csv  - Contains the sever name.

image

image

You will see status update on the screen as shown in the following screenshot:

image

Output – VM_ServerInfo.CSV – This out file contains all virtual Guest and Host information. 

image

Download – You can download this script form the following locations:

www.sivarajan.com - http://www.sivarajan.com/scripts/VM1.txt

TechNet Script Gallery - http://gallery.technet.microsoft.com/scriptcenter/4a6c40c6-9e16-4dd1-bea8-356a7d7735cf

SS

Santhosh Sivarajan

Microsoft MVP · Identity & Cybersecurity Architect

Santhosh has 30+ years of hands-on enterprise experience in Identity and Access Management, Microsoft Entra ID, Active Directory, Microsoft 365 and Zero Trust architecture. He is the author of two books on Windows Server and security, and leads consulting, assessments and training at SAG Business Group.

5 comments:

Hi Santosh,
Trying to run your commant but i'm getting this error. Can you pin point any solution?

You cannot call a method on a null-valued expression.
At line:17 char:34
+ $regKey= $reg.OpenSubKey <<<< ("SOFTWARE\\Microsoft\\Virtual Machine\\Guest\\Parameters")
+ CategoryInfo : InvalidOperation: (OpenSubKey:String) [], RuntimeException
+ FullyQualifiedErrorId : InvokeMethodOnNull

Do you have a valid computer name is the input file? Servers.csv

Make sure you have ServerName as the header.

I am getting the same error as JZ and ServerName is in the header of the csv

Also, I confirmed Remote Registry Services are running on the machines I am trying to access.

Here is a copy of the results:
Checking RANDOMSERVER Server.....
You cannot call a method on a null-valued expression.
At line:13 char:13
+ $regKey= $reg.OpenSubKey("SOFTWARE\\Microsoft\\Virtual Machine\\Gues ...
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+ CategoryInfo : InvalidOperation: (:) [], RuntimeException
+ FullyQualifiedErrorId : InvokeMethodOnNull

Complete. Review C:\Scripts\VM_ServerInfo.csv file for the result

EmailOcean is a brand new platform to cater to your email marketing needs.

It has been launched under the patronage of KOONK TECHNOLOGIES PVT. LTD. and is one of a kind platform for email marketing.

There is not point in harping on about the advantages of email marketing,as at this point in time,email marketing is the sole way of marketing or promoting your product,service or message in an efficient and quick manner.

EmailOcean provides you with the following advantages:
Highly Economical: It provides promotional emailing at an amazingly low rate of $0.10 per 1000 emails. The customer only pay for what is utilised. This is the lowest price available for mass mailing.
Web App to create and track campaign: The brilliance of EmailOcean lies in it making the process easier and faster for the customer,as compared to Amazon and Sendgrid, EmailOcean has a beautiful Web-app which makes creating and sending the campaign a lot more easier. Using this web-app one can also send and track their campaigns and get detailed analytics.You can see the users who have opened, clicked, unsubscribed and bounced.
Inbox Deliveries: Their inbox delivery rate is phenomenal.
Excellent Support: They also provide a support staff that is available at your beck and call 24*7.

As of now,the registrations are open by invitation but register yourself with the website and keep self updated as to when they are open to all or for your surprise invitation code.

Post a Comment

Popular Posts
Workstation Trust Relationship Issue Issue: You receive the following error message, when you try to login to the domain.  The security database on the server does not have ... ADMT Service Account - Permission and Configuration The ADMT service account needs to have proper permission in source and target domains.  You don’t need to use 2 separate accounts.  You can ... My First Peek into Microsoft Exchange 2010 By Santhosh Sivarajan Before I really dive into Exchange 2010, I thought I would install and play with it first. I took some screen shots and notes during the ins... ObjectSID and Active Directory What is an objectSID in Active Directory? When a new object is created in Active Directory, Domain Controller assigns a unique value used ... AD Group Report - List Group Members in Active Directory–PowerShell Script Updated Script - http://portal.sivarajan.com/2011/10/search-ad-collect-local-admin-group.html Script #1 This script... Add Users to a Group–PowerShell Script Purpose – Add users to a group from an input file – PowerShell V2 Script.  Input file – Input file (Users.csv) contains samAccountName in... User Account Migration and Merging – Part I (ADMT) Part I - User Account Migration and Merging Using ADMT Part II - User Account Migration and Merging Using QMM pre-creating user account ... User Account Migration and Merging – Part II (Quest Migration Manager) Part I - User Account Migration and Merging Using ADMT Part II - User Account Migration and Merging Using QMM Pre-creating user account in... Delete Stale or Inactive Computer Accounts from Active Directory Here is an easy way to identify and delete inactive or stale computers in an Active Directory environment.  Using the dsquery command you c... Converting PowerShell (PS1) to EXE / Standalone Application As we know, there many applications available to convert a PowerShell file to a standalone executable file.  Based on my experience, PowerSh...