If you´re in a hurry you could follow my quick starting guide below:
Step 1. Download and install VMware vShere PowerCLI:
VMware vSphere PowerCLI is available for download from http://www.vmware.com/support/developer/PowerCLI/index.html
Select the release you want to download from the drop-down list and click on the download-link.
Double-click on the downloaded installation-package and follow the instructions to install PowerCLI.
Step 2. Start PowerCLI and connect to a vCenter Server:
Double-click on the “VMware PowerCLI” icon to start PowerCLI.
Use the CmdLet ‘Connect-VIServer’ as shown below to connect to the vCenter Server:
First of all Powershell Remoting must be enabled on the machine you are going to manage. The command ‘Enable-PSRemoting -Force’ starts the WinRM service, changes its startup mode to automatic and creates a firewall-rule that allows incoming connections.
You can test the connection by entering the following Powershell command from an remote computer:
The result should look something like in the following example:
PS C:UsersTestUser> Test-WsMan TESTCOMPUTER
To summarize, you can initialize raw disks and partition and format volumes using the following simple PowerShell “script”:
Get-Disk | Where partitionstyle -eq ‘raw’ | Initialize-Disk -PartitionStyle MBR -PassThru | New-Partition -AssignDriveLetter -UseMaximumSize | Format-Volume -FileSystem NTFS -NewFileSystemLabel “disk2” -Confirm:$false
I have a management server with the Operations Manager Console installed. When I tried to start the Operations Manager Shell it failed with the following errormessage: Import-Module : The specified module ‘OperationsManager’ was not loaded because no valid module file was found in any module directory. At line:1 char:14 + Import-Module <<<< OperationsManager; .OperationsManagerFunctions.ps1; .O perationsManagerStartup.ps1 + CategoryInfo : ResourceUnavailable: (OperationsManager:String) [Import-Module], FileNotFoundException + FullyQualifiedErrorId : Modules_ModuleNotFound,Microsoft.PowerShell.Comm ands.ImportModuleCommand
The term ‘Start-OperationsManagerClientShell’ is not recognized as the name of a cmdlet, function, script file, or operable program. Check the spelling of the name, or if a path was included, verify that the path is correct and try again. At C:Program FilesSystem Center 2012Operations ManagerPowershellOperationsManagerStartup.ps1:26 char:35 + Start-OperationsManagerClientShell <<<< -ManagementServerName: “” -PersistConnection: $true -Interactive: $true; + CategoryInfo : ObjectNotFound: (Start-OperationsManagerClientShell:String) , CommandNotFoundException + FullyQualifiedErrorId : CommandNotFoundException
The reason for this was that the path to “C:Program FilesSystem Center 2012Operations ManagerPowershell” was missing in the envorinmental variable PSModulePath. Once completed and logged out and back in to the system everything worked as espected.