Comparison between Hyper-V and PowerShell vShpere - powershell

May I know what is the comparison between these 2 softwares. Hyper-V and PowerShell vSphere. I know that Hyper-V is only used in Microsoft. And PowerShell vSphere can be used in most OS. But I wish to compare these two softwares in Microsoft OS.
Thanks.

The vSphere PowerCLI, allows you to use PowerShell to communicate with the vSphere advanced programming interface (API).
PowerCLI 4.0 = VI Toolkit 1.5 + Bug Fixes + Host Profile Cmdlets
"Host Profile Cmdlets" Are commands that allow to create configuration files of ESX hosts and to apply to another host in order to evaluate differences.

Related

What is the proper way to check if HyperV is running?

I am trying to write a powershell script to install and set up Hyper-V machines. The install seems to be ok, however, I get contradictory responses from the system.
Basically, I use the (gcim Win32_ComputerSystem).HypervisorPresent to determine if HyperV is running.
It return False.
There is a similar class with the same member (gcim CIM_ComputerSystem).HypervisorPresent what is also returning False.
Also found this question How do you check to see if Hyper-V is enabled using PowerShell?
and this state property is Enabled
Do I miss something? These queries aren't the same? Could you point if any of these are deprecated?
Am I totally fooled, and Enabled means the system is capable to run HyperV, but actually it is not running?
CIM and WMI are a long tale but the short summary is that WMI is a Microsoft implementation of the OMI Standards defined by the DMTF, the Distributed Management Task Force, to come up with an industry wide standard. So, of course, creating one new standard resulted in a bunch of different implementations, which are basically their own standard.
But otherwise CIM and WMI can be thought of as different gateways to the same information for Windows computers. Different doors to the same house. More on that history and the distinctions here.
When I run the PowerShell commands you shared (either of them) on my machine with Hyper-V present, even when running as a standard, non-admin user, I get True back for both.
You can also check to see if the BIOS firmware has virtualization enabled by looking in the CIM_Processor class.
(Get-CimInstance win32_processor).VirtualizationFirmwareEnabled
True
You could also check to see if the Windows Feature is installed but that doesn't give you the full picture (what if the Windows feature is enabled in an image applied to a machine without virtualization components enabled in the BIOS, for instance.)
[ADMIN] C:\>(Get-WindowsOptionalFeature -FeatureName Microsoft-Hyper-V-All -Online).State
Enabled
Also, that technique 👆 requires admin permissions.
Another way, and maybe the easiest is to check is to see if the Hyper-V Computer Service is running, which is needed for any VMs to launch, and can only run if everything else on the machine is done correctly to enable Hyper-V.
Get-Service vmcompute
Status Name DisplayName
------ ---- -----------
Running vmcompute Hyper-V Host Compute Service
We used to deploy servers with a MDT Task Sequence and enable Hyper-V along the way. It required reboots and special commands to run to apply the right bios settings. Then, we could enable the Windows Features, but those required two reboots, so it was quite tricky to handle with most imaging systems. Our final 'Sanity Check' was whether the Hyper-V compute service was running.

how to install , configure and manage dns using powershell on Windows server 2008?

Salam every body
I need help to learn how
to Install,Configure and Manage dns using only powershell on Windows 2008?
This should get you started.
Installing DNS Server Role via Powershell
Open an elevated Powershell window and enter the following commands.
Import-Module Servermanager
Add-WindowsFeature 'DNS' -restart
For a more general guide about installing server roles via powershell, take a look at this page: Adding Server Roles and Features
On that page, just CTRL+F for Powershell.
Configuring DNS Server Role via Powershell
Since configuration is a very general topic, here's the link to the documentation:
Domain Name System (DNS) Server Cmdlets
You can list all the available commands with Get-Command –Module DnsServer

Will a PowerShell script developed for a Windows 7 run on Win Server 2008 R2?

I have developed a large PowerShell script that has been refined on a Windows 7 64bit box and now I intend to run it on a Windows server 2008 r2. Assuming the PowerShell versions are the same, will there be any major issues with syntax in-between Win 7 and WS 2008 R2?
The script checks a lot of WMI and registry keys like GWmi Win32_NetworkLoginProfile and Get-Itemproperty -Path Registry::HKLM\Software\Microsoft\"Windows NT"\CurrentVersion\winlogon\
Most PowerShell information is driven towards managing servers so I assume I will be safe, but I want to see if you all can help me learn some lessons before I start banging my head against the wall.
Thanks
There are no syntax differences between PowerShell on Windows 7 and PowerShell on Windows Server 2008 R2. You may encounter differences in existing services, WMI classes, and registry keys, though.
First you should test it on a virtual machine to see if it works or not. Then try it on the physical machine. If it doesn't work, modify the code to the specific registry keys.
The short answer is yes. I run PSv4 on both my desktop and one of my servers running 08. Be sure to import the correct modules (if any) and allow for RPC in your firewall (And winrm) if applicable. One note- depending on what you run with the server, commands and functions are only as good as the version you run against (even when invoked). I ran into this problem as I scripted in v4 and environmentally my firm is almost all v2. Enabled -verbose error output and test in virtual machines or a loner laptop. (This is what I did). Good luck!

How to determine if EMC PowerPath is installed on an ESX host using PowerCLI

TL;DR How can I use PowerCLI to determine if EMC PowerPath is installed on an ESX host?
I am attempting to write a script that will perform a host-masking operation when moving a LUN from one storage group to another. This is to accommodate the All Paths Down error that can occur due to a race condition in ESX 4.1. The steps are described in VMWare KB 1015084 and 1009449. These steps are written for use from the service console. I want to avoid scripting SSH activity and instead do the entire thing in Powershell/PowerCLI.
In our environment, we are using EMC PowerPath on most - but not all - of our hosts. This LUN masking only needs to be performed on hosts where PowerPath is installed, so I am attempting to test each host to determine this.
I have been pulling my hair out trying to determine how to do this with PowerCLI. If connected to the ESX service console, the command esxcfg-mpath --list-plugins will show if PowerPath is installed. In the vCenter GUI, it can be determined by:
Select Host -> Configuration -> Storage Adapters -> Select Adapter -> View Devices -> Examine "Owner" column
Using get-scsilun in PowerCLI returns an object that contains all this information except this Owner column.
I am stumped. I had hoped that a get-esxcli object would have some kind of equivalent methods, maybe in satp or nmp, but so far I can't find anything.
As suggested, I'll answer my own question:
The answer is: $esxcli.corestorage.plugin.list() will return a list of plugins installed on the host.
To get this information from PowerCLI 6.5 you can use the following:
(Get-ESXCLI -VMHost <host>).Storage.Core.Plugin.List()

Does a command-line client exist for Microsoft Jet database engine?

Is there such a thing as a shell-based command-line client for Microsoft's Jet database engine?
Something similar to SQLite 3.x (sqlite3.exe) for SQLite.
Will PowerShell be suitable? Fellow MVP Richard Siddaway has started a very interesting series of blog postings on using PowerShell and Access. You can ignore the Office 2010 tag on his blog postings. Also note that I know nothing about PowerShell.
This may suit:
Cscript.exe is a command-line version
of the Windows Script Host that
provides command-line options for
setting script properties.
With Cscript.exe, you can run scripts
by typing the name of a script file at
the command prompt. Like Microsoft
Internet Explorer, Windows Script Host
serves as a controller of Windows
Script compliant scripting engines,
but Windows Script Host has very low
memory requirements. Windows Script
Host is ideal for both interactive and
non-interactive scripting needs, such
as logon scripting and administrative
scripting.
Windows Script Host supports scripts
written in VBScript or JScript.
http://www.microsoft.com/resources/documentation/windows/xp/all/proddocs/en-us/wsh_runfromcommandprompt.mspx?mfr=true
Something like osql with the right data provider? http://msdn.microsoft.com/en-us/library/aa214012(SQL.80).aspx
Entering the conversation here 10 years after the original question, but I've played with a couple of tools that should work:
YouAccess (http://youaccess.sourceforge.net): "YouAccess is a free (donationware) lifesaver console µapplication intended for SQL management of Microsoft® Access™ databases from command line, including creating them."
JetSQLConsole (https://sourceforge.net/projects/jetsqlconsole): "A command line/console interface for Microsoft Access databases, very similar to the MySQL client application."