Snapshots PowerCli 5.5 Release 1

I used powercli to create the snapshot, and I noticed that it creates two snapshots each time.

No idea why?

So I personally only 2 photos once I have more then 1 serviceInstance as vCenter.

Please, see:

Get-view ServiceInstance

If you see more then 1 > process this command

Disconnect-VIServer *-confirm: $false

Then plug again. and try to make the new snapshot. (but check with get - vm if you get double lines or not)

-------------------------------------------------------------------------------

While you have a green "Write-Host" on the first line > then immediately guess it's to have something to do with those.

Best regards

Max

Tags: VMware

Similar Questions

  • in bulk license with PowerCLI 6.0 Release 2 broken?

    Hello

    I upgraded successfully to PowerCLI 6.0 Release 1 to PowerCLI 6.0 Release 2.

    After that, I wanted to add a new license to the license in bulk newly deployed ESXi Hosts with Auto deploy but encountered the following error:

    $licenseData = new-Object VMware.VimAutomation.License.Types.LicenseData

    New-Object: cannot find type [VMware.VimAutomation.License.Types.LicenseData]: check that the assembly containing this type is loaded.

    On line: 1 char: 16

    + $licenseData = new-Object VMware.VimAutomation.License.Types.LicenseData

    +                ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

    + CategoryInfo: InvalidType: (:)) [New-Object], PSArgumentException)

    + FullyQualifiedErrorId: TypeNotFound, Microsoft.PowerShell.Commands.NewObjectCommand

    I'm sure that it worked with PowerCLI 6.0 Release 1.

    Did someone else run into it as well? Perhaps no work around?

    I appreciate your help.

    see you soon,

    Ronny

    Hello

    It is a backward compatibility problem that was introduced in PowerCLI 6.0R2. It will be addressed in a version of the next patch very soon, but until then, you can work around

    replacement of

    'VMware.VimAutomation.License.Types.LicenseData '.

    with

    'VMware.VimAutomation.License.Types.V1.LicenseData '.

    Keep in mind that if you do the above to make your script works and later upgrade your PowerCLI to a version more recent that you should check back this change in scripts.

    -Dimitar Milov

  • PowerCLI 5.8 Release 1 throws an exception when starting

    So I decided to upgrade my PowerCLI 5.5 R2 Patch 1 to the latest 5.8, released the last week or two. (Yes, I know, I guess I decided to live dangerously, using new versions :-)))  And the upgrade installation went well. But when I run PowerCLI, I get:

    Add-PSSnapin: the initializer for type for 'VMware.VimAutomation.Storage.Interop.V1.Service.StorageServiceFactory' threw an exception.

    C:\Program Files\VMware\Infrastructure\vSphere PowerCLI\Scripts\Initialize-PowerCLIEnvironment.ps1:48 tank: 10

    + Add-PSSnapin $snapin

    +          ~~~~~~~~~~~~~~~~~~~~

    + CategoryInfo: NotSpecified: (:)) [Add-PSSnapin], TypeInitializationException)

    + FullyQualifiedErrorId: System.TypeInitializationException, Microsoft.PowerShell.Commands.AddPSSnapinCommand

    Someone knows why? I didn't update the vSphere CLI, just PowerCLI. I was still able to connect to my vCenter (I connect to my vCenter in my profile). But I don't know what will not work. I did a quick 'Get-VMHost', "Get - VM" and a few others - they are all working well.

    Value name

    ----                           -----

    PSVersion 4.0

    WSManStackVersion 3.0

    SerializationVersion 1.1.0.1

    CLRVersion 4.0.30319.18444

    BuildVersion 6.3.9600.16406

    PSCompatibleVersions {1.0, 2.0, 3.0, 4.0}

    PSRemotingProtocolVersion 2.2

    PowerCLI Version

    ----------------

    VMware vSphere PowerCLI 5.8 Release 1 build 2057893

    ---------------

    Versions of the snap

    ---------------

    VMWare AutoDeploy PowerCLI component 5.5 build 1983942

    VMWare ImageBuilder PowerCLI component 5.5 build 1983942

    License of VMware PowerCLI component 5.5 build 1265954

    VMware Storage PowerCLI component 5.8 build 2057894

    VMware PowerCLI VDS component 5.8 build 2031581

    VMware vSphere PowerCLI component 5.8 build 2031581

    VSphere VMware Update Manager PowerCLI 5.1 build 782803

    Ideas, anyone? Should I roll back to 5.5? Anyone else having problems?

    An update. We have improved our environment to 5.5 (all ESXi hosts and vCenter). Therefore, I improved my heavy client installation. So I decided to try again after update my Powershell to 5.8.

    And then everything just worked. No error at startup of Powershell. All respond as it should.

    Can't imagine why the 2 would be connected, but no matter, I am now under 5.8 on my Windows 7 workstation.

  • Impossible to find PowerCLI 5.5 release 1 download location

    Hi all

    I was wondering if someone can tell me PowerCLI 5.5 release 1 installation file. I need to install on Windows 2012 PowerCLI and as far as I know, this is the only version that supports Windows 2012. Unfortunately I can not find the download location for this tool, only the documentation for it. Any help would be appreciated.

    Best regards

    Hello LucD,

    Thanks for your suggestion, I tried to install PowerCLI on different station and it worked, which confirmed that I have a problem with this particular system instead of the version of it.

    I was also able to successfully install PowerCLI 5.5 on designated server (it was important for me because it is the only physical server in the environment and I need virtual shutdown in case of power failure).

    The solution was easy, so I thought: I had to install all the updates from Windows Update since December of 2013 (that was the last time updates have been installed), after that (and the restart of the ofc) PowerCLI 5.5 installation went very well.

    Thanks for your help and your time - I really appreciate your efforts.

    Best regards

    Gro'rhor

  • $global: variable defaultVIServer gets replaced by data warehouses in PowerCLI 6.0 Release 2

    I recently noticed a strange behavior with the variables global:defaultVIServer(s) of $.

    The content has been change in the middle of my script. especially after sub $global: defaultVIServer.Name

    10.10.10.10 for 10.10.10.10@443

    For some reason any port number was getting stuck at the end of the name field, which failed in the cmdlet Test-connection (ping).

    After some research, I went down to my use of the global variable of VMware, vmstores

    The following line replaces $global: defaultVIServer

    $dsList = (dir-path vmstores :)

    Code snippet

    to connect-VIServer $vctIP

    Global $: defaultVIServer | FL

    $dsList = (dir-path vmstores :)

    Global $: defaultVIServer | FL

    $dsList | FL


    You can see that $global: defaultVIServer gets replaced by the data of $dsList after the dir command

    Screenshots are attached.


    At least, I have to unplug my server and reconnect to solve this problem.


    Is there a better way to get the list of warehouses of data (and their paths) with PowerCLI 6.0?

    Maureen

    I only call this command in one place in my scripts, so I tested for a '@' char in the $global: variable DefaultViServer after this call and if I find it then I disconnect and reconnect to my servers.  This version fixes the global variable, which I use in other places in my scripts.

    I didn't change my scripts having to use the other variable, $global: DefaultVIServer.ServiceUri.Host,.

    because it would have been a little more difficult.

    In addition, when the bug fix is implemented, I won't change my scripts.

    Extracted from:

    foreach ($server in $global: DefaultViServers)

    {

    # check if @ tank is in the name; i.e. @port_number

    If ($server. Name - match ' @')

    {

    # split the name IP address and port number

    $serverNameList = $server. Name.Split('@')

    Disconnect $serverNameList VIServer [0]

    sleep - 1 seconds

    SE $serverNameList connect-VIServer [0]

    }

    }

  • PowerCli 5.5 released

    Here is the link for PowerCli 5.5

    https://my.VMware.com/group/VMware/details?downloadGroup=PCLI550 & ProductID = 352 & Download = true & starts = 0b8a733a67ebb3aca6bf...

    You can also use the link on the PowerCLI overview page.

  • ERROR: New-Snapshot (the operation is not valid due to the current state of the object)

    Hello guys!

    I've been googlin everywhere, but impossible to find a solution to my problem. I hope that one of you, qualified people can point me in the right direction :)

    I created a powerCLI script to take a snapshot of our most important servers before we do our weekly maintenance. The idea to run the script as regular powershell script and then have

    1. Add snap-ins powercli and connect to virtualcenter servers
    2. ask the VC servers to virtual machines in a perticular folder
    3. Loop foreach on these servers to create a snapshot with the name $snapshotname

    Currently, I just do it turn on a test folder that I created in vSphere that contains 3 test VMs:

    • Testmagne1 - normal operation
    • Testmagne2 - I renamed the folder for this virtual machine in the data store to generate an error.
    • testmagne3 - normal operation

    Since the servers (not the test servers, but good ones) is the most important servers in our environment, I want to be able to catch exceptions and errors when I run this script. I do this with the Try - Catch - Finally works.

    The strange thing is:

    The release of Powershell/PowerCLI is different from the output in VirtualCenter (!)

    In virtualcenter, the output is as follows

    • Testmagne1 - snapshot is created successfully - as expected
    • Testmagne2 - the snapshot creation fails because it cannot find the files .vmx - as expected
    • Testmagne3 - snapshot is created successfully - as expected

    However, the exit in powercli is slightly different:

    • Testmagne1 - snapshot is created successfully - as expected
    • Testmagne2 - creation of the snapshot fails because it cannot find the files .vmx - as expected
    • Testmagne3 - snapshot fails with the error message: operation is not valid due to the current state of the object - huh?


    Apparently once the first error is generated all succeeding VMs get error "the operation is not valid due to the current state of the object"


    I've been pulling trying to figure this problem on my hair, but I'm not getting anywhere


    Here is some additional information:

    1. the Script (abridged version of it. It generates the same error):

    -STARTUP SCRIPT-

    $ErrorActionPreference = "stop".

    Add-PSSnapin VMware.VimAutomation.Vds, VMware.VimAutomation.Core | Out-Null

    SE connect-VIServer VIRTUALCENTER1, VIRTUALCENTER2 | Out-Null # Sensored VirtualCenter names

    $servers = get-VM-location 'testfolder '.

    $snapshotname = 'Testsnapshot '.

    $verifycreatesnapshot = Read-Host "you are about to create snapshots for $servers. Do you want to continue? o/n.

    If ($verifycreatesnapshot - eq 'y') {}

    Write-Host "snapshots of creation...". »

    {ForEach ($i in $servers)

    Write-Host "instant Creation for $i."

    Try {new-Snapshot - VM $i - name $snapshotname |} Out-Null}

    Catch {$_.exception | select *;} Write-Host "Unable to create the snapshot for $i" ;}

    }

    Write-Host "command finished.

    }

    else {Write-Host "Operation canceled by user"}

    Read-Host "end of the script. Press ENTER to close. "

    ------------------ END SCRIPT -------------------

    2. the PowerCli error messages:

    Error for Testmagne 2 (as expected):

    File: [DATASTORE114] testmagne2/testmagne2.vmx

    DynamicType:

    DynamicPropertyInternal:

    FaultCause:

    FaultMessage:

    ErrorId: Client20_TaskServiceImpl_CheckServerSideTaskUpdates_O

    perationFailed

    ErrorCategory: NotSpecified

    TargetObject:

    RecommendedAction:

    SessionId:

    ConnectionId: /VIServer = SENSORED: 443 /

    Severity: error

    Message: 31/10/2013-10:52:16 New-Snapshot the operat

    ion for the entity 'testmagne2' failed with the follo

    the wing's message: "file [DATASTORE114] testmagne2/testmagn".

    E2.vmx was not found.

    Data: {ParameterValues}

    InnerException: VMware.Vim.VimException: exploitation of the entity

    'testmagne2' failed with the following message: 'thread '.

    testmagne2/testmagne2.vmx e [DATASTORE114] was not crazy

    ND ".

    TargetSite:

    StackTrace:

    HelpLink:

    Source:

    Failed to create the snapshot for testmagne2

    Error for testmagne3:

    Creation of snapshot for testmagne3

    ErrorId: Core_BaseCmdlet_UnknownError

    ErrorCategory: NotSpecified

    TargetObject:

    RecommendedAction: An error occurred when executing command: new-Snapshot. I have check

    f exception for more details.

    SessionId:

    Login ID:

    Severity: error

    Message: 31/10/2013-10:52:17 instant New-capture operation is not

    valid due to the current state of the object.

    Data: {ParameterValues}

    InnerException : System.InvalidOperationException: operation is not valid from

    e to the current state of the object.

    at VMware.VimAutomation.ViCore.Impl.V1.Task.ViCoreTaskCo

    reServiceProviderImpl.BeginTaskCompletionPoll (list 1 taskLi

    St)

    at VMware.VimAutomation.Sdk.Impl.V1.Task.CoreTaskService

    Impl.WaitForTask (IEnumerable 1 taskList, ProgressCallback p

    rogressCallback)

    at VMware.VimAutomation.Sdk.Util10Ps.BaseCmdlet.BaseCmdl

    and. EndProcessingErrorHandled()

    at VMware.VimAutomation.ViCore.Util10Ps.BaseCmdlet.BaseC

    mdlet. EndProcessingErrorHandled()

    TargetSite: Sub ThrowTerminatingError (System.Management.Automation.Err

    orRecord)

    StackTrace: At System.Management.Automation.MshCommandRuntime.ThrowT

    erminatingError (ErrorRecord errorRecord)

    HelpLink:

    Source: System.Management.Automation

    Failed to create the snapshot for testmagne3

    3 PowerCLI version

    PowerCLI Version

    ----------------

    VMware vSphere PowerCLI 5.5 Release 1 build 1295336

    ---------------

    Versions of the snap

    ---------------

    VMWare AutoDeploy PowerCLI component 5.5 build 1262826

    VMWare ImageBuilder PowerCLI component 5.5 build 1262826

    License of VMware PowerCLI component 5.5 build 1265954

    VDS's VMware PowerCLI component 5.5 build 1295334

    VMware vSphere PowerCLI component 5.5 build 1295334


    4 VirtualCenter version

    VMware vCenter Server Version 5.0.0 Build 913577

    vSphere Client Version 5.0.0 Build 913577

    Hosts: VMware ESXi 5.0.0 Build 914586

    If you need additional information, let me know

    Any help is greatly appreciated

    Thank you!

    -Loincloth



    Definition - ErrorAction Stop locally on the cmdlet will not solve the problem. We have found and solved the problem and the fix will be available in the next version. Until then, you can use the $error variable to detect whether the cmdlet was successful or not. You can clear the $error variable before calling the cmdlet and check if it's still empty after the call.

  • PowerCLI find the bios or the efi boot option

    Try to get a list of all my virtual machines and that they can start BIOS or EFI via PowerCLI 5.5 release 1.  Doesn't seem to be in ExtensionData.Config.BootOptions, as I expect and I'm having a terrible time trying to track down where he could be.  Must be somewhere, right?  I would be delighted if someone can tell me where this attribute is maintained.

    Thanks for your suggestions

    Have you already tried

    Get - VM |

    Select Name,@{N='Firmware'; E={$_. ExtensionData.Config.Firmware}}

  • How to get the driver network card and on the use of the PowerCLI firmware version?

    Hi all

    I would like to know if anyone can help me in sharing the PowerCLI script to list the server NETWORK card driver and the firmware version?

    Note: I use the HP Blade Server and it's manual ESX - CLI command output:

    HP BL 465c G8
    ~ # ethtool-i vmnic0
    pilot: be2net
    version: 10.5.65.4
    firmware version: 10.2.340.19
    bus-info: 0000:04:00.0

    HP BL 465c G7
    ~ # ethtool-i vmnic0
    pilot: be2net
    version: 10.2.293.0
    firmware version: 4.9.416.7
    bus-info: 0000:04:00.0

    Any kind of help would be greatly appreciated.

    Thank you.

    PowerCLI Version

    ----------------

    VMware vSphere PowerCLI 6.0 Release 2 build 3056836

    ---------------

    Component versions

    ---------------

    VMWare AutoDeploy PowerCLI component 6.0 build 2358282

    VMWare ImageBuilder PowerCLI component 6.0 build 2358282

    VMware vSphere PowerCLI component 6.0 build 3052101

    It works for you?

    $esxName = "MyEsx".

    $esxcli = get-EsxCli - VMHost $esxName

    $esxcli.network.nic.list () | %{

    $esxcli.network.nic.get ($_.) Name) |

    Select Name,

    @{N = "Driver"; E={$_. DriverInfo.Driver}},

    @{N = 'Version'; E={$_. DriverInfo.Version}},

    @{N = 'Firmware Version'; E={$_. DriverInfo.FirmwareVersion}}

    }

  • Why Get-ScsiLun RuntimeName field is always empty in PowerCLI 6.0 and how do I get a Monday, now?

    I used PowerCLI 6.0 Release 2 and tests my 5.5 scripts to make sure they still work ok with 6.0.

    The more I watch this more I think it's a problem of ESXi 6.0 - (ESXi 6.0 Update 1)

    I used a good script by Luc relaxing that tells you how to get a Monday using PowerCLI

    The realization of a New VIProperty called Monday - notes LucD

    This script is dependent on the RuntimeName field that is returned by the Get-ScsiLun cmdlet, which is now always empty in PowerCLI 6.0.

    Is there another way to get the Monday?

    I see the (s) Monday when I VI Client in the host and the look on the storage adapters.

    Basic steps:

    $scsiList = get-vmHost - vm $vmName | Get-scsiLun

    $scsiList | Select RuntimeName

    $scsiList | FL

    RuntimeName always comes back empty, where it is used to look like vmhba0:C2:T0:L11

    where L11 is the Monday

    Screenshot is closed.

    Thank you

    Maureen

    This seems to be a bug on the side of ESXi, so I came up with an ugly workaround that is attached.

    I used the get-scsiLunPath cmdlet, which also has the LUN IDS integrated in the name field. It returns a list of objects, but the logical unit number ID is always the same in each of the LUNPath objects in my environment, so it works.

    When the bug is fixed, workaround is skipped.

    Overview:

    Get all SCSI LUNS for a given server/host

    If the length of the RuntimeName field is 0, do workaround

    for each number of logic extracted from the server unit, call Get-SCSiLunPath | Select - 1 first; don't need the entire list

    Out of the logic of the end of the name unit number ID and convert them into int

    work: compare found LUN ID to the one I am looking for and save it.

  • PowerCLI 6.0R2 bug with Import-Module-prefix?

    Yesterday I installed a couple of nine Win2012R2 servers and of course installed PowerCLI 6.0R2.

    In order to avoid multiple commands with the same name, we use the--Prefix setting for the modules. It worked great in R1 but I am facing problems with R2.

    Load the modules with code below:

    $VMwareModules = 'VMware.VimAutomation.Core', 'VMware.VimAutomation.Vds'

    foreach ($Module in $VMwareModules) { }

    if (! (Get-Module | ? {$_. (({Name -eq $Module})) {}

    Try {

    Import-Module -Nom $Module -Prefix "VMW"

    }

    Catch {

    $ErrorMessage = $_ . Exception. Message

    breaking

    }

    }

    }


    When running Get-Module now the modules but show the Basic module shows all ExportedCommands (which he did in R1).

    Basic modules shows too, now that 'script' instead of 'manifesto', as in R1.

    Not sure if this has anything to do with this.


    If we compare the number of orders 'Raphael' in R1 and R2, missing 300 orders for the Basic module in R2.


    Is this a bug? Is there a solution?


    R2:

    PS C:\ > get-module

    Version of Moduleinfo name ExportedCommands

    ---------- -------    ----                                ----------------

    Script Initialize-VMware_VimAutomation_Vds 0.0

    Manifest 3.1.0.0 Microsoft.PowerShell.Management {Add-Computer, Add-Content, Checkpoint-Computer, Clear-Con...}

    Manifest 3.1.0.0 Microsoft.PowerShell.Utility {Add-Member, add-Type, Clear-Variable, Compare-Object...}

    VMware.VimAutomation.Core script 6.0.0.0

    Clear VMware.VimAutomation.Sdk 6.0.0.0

    6.0.0.0 binary VMware.VimAutomation.Vds {add-VDSwitchPhysicalNetworkAdapter, add-VDSwitchVMHost, E...

    PS C:\ > get-vitoolkitversion

    PowerCLI Version

    ----------------

    VMware vSphere PowerCLI 6.0 Release 2 build 3056836

    ---------------

    Component versions

    ---------------

    VMWare AutoDeploy PowerCLI component 6.0 build 2358282

    VMWare ImageBuilder PowerCLI component 6.0 build 2358282

    VMware vSphere PowerCLI component 6.0 build 3052101

    VDS's VMware PowerCLI component 6.0 build 3052101


    PS C:\ > (get-command * vmw *) .count

    33


    R1:

    PS C:\ > get-module

    Version of Moduleinfo name ExportedCommands

    ---------- -------    ----                                ----------------

    Script Initialize-VMware_VimAutomation_Vds 0.0

    Manifest 3.1.0.0 Microsoft.PowerShell.Management {Add-Computer, Add-Content, Checkpoint-Computer, Clear-Con...}

    Manifest 3.1.0.0 Microsoft.PowerShell.Utility {Add-Member, add-Type, Clear-Variable, Compare-Object...}

    VMware.VimAutomation.Core manifesto 6.0.0.0 {Add-PassthroughDevice, add VirtualSwitchPhysicalNetworkAd... }

    Clear VMware.VimAutomation.Sdk 6.0.0.0

    6.0.0.0 binary VMware.VimAutomation.Vds {add-VDSwitchPhysicalNetworkAdapter, add-VDSwitchVMHost, E...

    PS C:\ > get-vitoolkitversion

    PowerCLI Version

    ----------------

    VMware vSphere PowerCLI 6.0 Release 1 build 2548067

    ---------------

    Component versions

    ---------------

    VMWare AutoDeploy PowerCLI component 6.0 build 2358282

    VMWare ImageBuilder PowerCLI component 6.0 build 2358282

    License of VMware PowerCLI component 6.0 build 2315846

    VMware vSphere PowerCLI component 6.0 build 2548068

    VDS's VMware PowerCLI component 6.0 build 2548068

    PS C:\ > (get-command * vmw *) .count

    12 p

    Hello

    First of all, I must say that you are right. This is a regression introduced in 6.0 R2 caused by updates in the manifesto of the module which target to attack another bug. Let me give you more explanation in detail on the specifics of the module VMware.VimAutomation.Core.

    Binary VMware.VimAutomation.Core is always snap-in in 6.0 R1, 6.0R2 and 6.0 R3. Which is related to internal constraints that will be overcome in the next version and the binary file is converted to module as it should.

    As binary VMware.VimAutomation.Core is pluggable PowerCLI makes it look like a module declaring a manifest module which load the snap and load so its commands to load this module 'false '. The VMWare.VimAutomation.Core module so manifest module powershell that refer to a script that loads the binary VMWare.VimAutomation.Core snap. Script files, the manifesto and that loads the snap are in the module folder: '\Modules\VMware.VimAutomation.Core '.

    Now the problem you face is that, in 6.0R1, the script that loads the snap was referenced in NestedModules module manifest, which means that all orders imported as nested module are imported into the scope of the module session. This makes the component controls snap to consider as a command module and that's why your use case has worked with 6.0R1. The problem with this is that if someone calling Remove-Module command for this module it deletes the orders of the current session, and if Import-Module is called again in the same session, that it will fail with an error "The VMware.VimAutomation.Core is already added," so no commands are loaded once the module is removed from the current session. Because of this bug, we decided not to reference the script component snap load in NestedModules but in ModulesToProcess of the module manifest. When it is referenced in the ModulesToProcess that makes the script commands to be loaded in the scope of global session which means that these commands are removed from the session when Remove-Module is called and if Import-Module is called once again he will not fail because the module manifest try again to load the sanp-in. When the controls are respectively in the context that they are not affected by the specification of modules and that is why they cannot be imported with the desired prefix you want.

    To be honest we didn't know this side effect when we discussed the initial bug with Remove-Module. All these problems will be solved in the next PowerCLI release when binary VMware.VimAutomation.Core will become the module. Until then, I suggest you workaround with fixation of the VMWare.VimAutomation.Core manifest file. To do this you have need open and change of \Modules\VMware.VimAutomation.Core\VMware.VimAutomation.Core.psd1

    the following way:

    1. set ModuleToProcess on a string is empty

    2. put NestedModules to @('VMware.VimAutomation.Core.ps1')

    This will make the module to behave in the same way as 6.0R1

    Kind regards

    Dimitar Milov

  • Cannot install powerCLi

    I try to install powercli U1 5.8 on a new machine, windows 2012.  I installed the .net framework 4.5.2 and checked that it is installed.  Then I went to install POwerCLi and got this error:

    ".net framework 2.0 is not installed on this computer.  Please download and install .net framework 2.0 before installing Vmware vSphere powerCLI.

    What is the problem?  Do I have to uninstall .net framework 4.5.2 and use an earlier version as 2.0?

    Please take a look at pictures of compatibility for vSphere PowerCLI 5.8 Release 1 and select "Installation required Conditions" in the drop down menu to find out what is required.

    André

  • Get-PAF * commands PowerCLI 5.8 R1 throws the error message "State HTTP 400: bad request".

    I've recently updated to PowerCLI 5.8 R1 and wanted to try the new cmdlts of PAF, but however, I go to this topic I seem to get error regardless of what below PAF Get * cmdlet I run:

    Get-SpbmStoragePolicy: 2014-12-11 14:04:50 Get-SpbmStoragePolicy therequest failed stateful HTTP 400: bad request.

    On line: 1 char: 1

    + Get-SpbmStoragePolicy

    + ~~~~~~~~~~~~~~~~~~~~~

    + CategoryInfo: NotSpecified: (:)) [Get-SpbmStoragePolicy], VimExreception )

    + FullyQualifiedErrorId: Core_BaseCmdlet_UnknownError, VMware.VimAutomatio n.Storage.Commands.Cmdlets.Spbm.GetStorageProfile

    I tried to connect to the VC with the HTTPS setting - but same error Protocol.

    I thought that maybe the snap of storage had not been imported but it seems to be there:

    PowerCLI C:\ > Get-PSSnapin. Select name

    Microsoft.PowerShell.Diagnostics

    Microsoft.PowerShell.Core

    Microsoft.PowerShell.Utility

    Microsoft.PowerShell.Host

    Microsoft.PowerShell.Management

    Microsoft.PowerShell.Security

    Microsoft.WSMan.Management

    VMware.VimAutomation.Core

    VMware.VimAutomation.Vds

    VMware.VimAutomation.License

    VMware.DeployAutomation

    VMware.ImageBuilder

    VMware.VimAutomation.Storage

    I run PS4.0 with PCLI 5.8R1:

    PowerCLI C:\ > Get-VIToolkitVersion

    PowerCLI Version

    VMware vSphere PowerCLI 5.8 Release 1 build 2057893

    ---------------

    Versions of the snap

    VMWare AutoDeploy PowerCLI component 5.5 build 1983942

    VMWare ImageBuilder PowerCLI component 5.5 build 1983942

    License of VMware PowerCLI component 5.5 build 1265954

    VMware Storage PowerCLI component 5.8 build 2057894

    VMware PowerCLI VDS component 5.8 build 2031581

    VMware vSphere PowerCLI component 5.8 build 2031581

    VSphere VMware Update Manager PowerCLI 5.5 build 1302474

    PowerCLI C:\ > $psversiontable

    Value name

    PSVersion 4.0

    WSManStackVersion 3.0

    SerializationVersion 1.1.0.1

    CLRVersion 4.0.30319.18063

    BuildVersion 6.3.9600.16406

    PSCompatibleVersions {1.0, 2.0, 3.0, 4.0}

    PSRemotingProtocolVersion 2.2

    I am running PowerCLI on a Win2k8Ent server, not locally on the vCenter.

    Any ideas? Why should he use HTTP? 5.5 and older commands work properly.

    It seems that you use vCenter 5.1, is that correct?

    Please note that the PAF for PowerShell support is for vCenter 5.5 and higher.  Prior to 5.5, the PAF API was not public.

    Alex

  • Simple question PowerCLI?

    So - I used PowerCLI 5.8 release 1, and I write a simple script - but do not get the correct feedback...

    a single vCenter (5.5 appliance, build 1750787), several hosts, but I cleaved off 2 hosts in a cluster proof-of-concept/test (the cluster is called POC).

    POC1 $= Get-Cluster POC | Get-VMhost

    foreach ($esx in $POC1) {Get-VMHostNetworkAdapter - physics - name vmnic1}

    The question that I keep running into is that while that line-1 works perfectly, showing me the 2 hosts in the cluster of POC, however, line-2 shows me all the vmnic1 all hosts connected to the vCenter. I know I'm missing something - probably simple. I can't find anything in the syntax. the only thing I can think is that the $esx is wrong. I tried $VMHost and a few others, but all with the same result. what Miss me? (apart from a few balls).

    Here you go

    POC1 $= Get-Cluster POC | Get-VMhost

    foreach ($esx in $POC1) {$esx |} Get-VMHostNetworkAdapter-physics - name vmnic1}

  • Get-VDPortGroup shows as an invalid cmdlet in PowerCLI 5.5 R2

    I cannot running Get-VDPortGroup (and new-VDPortGroup and get-VDswitch).  Get-VDPortGroup translates as «the term 'get-vdportgroup' is not recognized under the name of a cmdlet...» ».  Get-PowerCLIConfiguration shows that I'm under VMware vSphere PowerCLI 5.5 Release 2 Patch 1 build 1931983.  All versions of the snap also show 5.5.  I get the same results on Windows 2012R2 and Windows 2008R2.  I improved 5.1 to 5.5 R2 PowerCLI.  I installed PowerCLI 5.5 R2 on a new computer.  I included support for vCloud Director and excluded vCloud Director for various facilities, I tried.

    What I am doing wrong?

    I came across this recently myself.  The 'VDSwitch' cmdlets are provided separate from the snap-snap-vmware.vimautomation.core.

    Must be added:

    Add-PSSnapin VMware.vimautomation.vds

Maybe you are looking for