Change the local administrator passwd in a technical object of personalization

Hello

I would like to enter an existing CustomizationSpec and change the local administrator password before deploying a clone, but I don't want to change the stored specification or create a new.

I tried:

$spec = get-OSCustomizationSpec MySpecName

$spec. ExtensionData.spec.Identity.GuiUnattended.Password.plainText = $true
$spec. ExtensionData.spec.Identity.GuiUnattended.Password.value = 'newpass '.

Then, I deployed a clone using $spec, but I can not connect to the clone with the new password or the original source VMs (blank) password.

Can it be done without the help of the New-OSCustomizationSpec cmdlet?  -I'm not really a real spec created in the database that I have to delete it later, in large part because I would have to enter new credentials in the script domain user, or pull of an existing spec (don't know if it works well)

I used PowerCLI 4.1 build 332441 U1

See you soon

Mark

You will need to provide a VirtualMachineCloneSpec to the CloneVM_Task method.

Here you can to place the CustomizationSpec, which is part of the CustomizationSpecItem.

The following script is what you asked for.

$vmName = "SourceVM" $vmNewName = "NewVM" $baseOSCustomizationName = "test" $newAdminPswd = "newpassword"

$vm = Get-VM -Name $vmName $folder = Get-Folder -Name vm -Location (Get-Datacenter -VM $vm)

$cust = Get-OSCustomizationSpec -Name $baseOSCustomizationName$spec = New-Object VMware.Vim.CustomizationSpecItem$spec.Spec = $cust.ExtensionData.Spec

$spec.spec.Identity.GuiUnattended.Password = New-Object VMware.Vim.CustomizationPassword $spec.spec.Identity.GuiUnattended.Password.plainText = $true $spec.spec.Identity.GuiUnattended.Password.value = $newAdminPswd$cloneSpec = New-Object VMware.Vim.VirtualMachineCloneSpec $cloneSpec.customization = $spec.Spec$cloneSpec.poweron = $true$cloneSpec.template = $false$cloneSpec.Location = New-Object VMware.Vim.VirtualMachineRelocateSpec$vm.ExtensionData.CloneVM($folder.Extensiondata.MoRef,$vmNewName,$cloneSpec)

Note that the new virtual machine is placed at the root of the data center.

Tags: VMware

Similar Questions

  • What would prevent a local administrator to change the local policies?

    The problem occurred on a workstation XP (svc pk 3) within a W2K3 domain. It is the only station working (103 others) which I can't distance in via mstsc since my post (also under XP svc pk 3). I went (work to) the workstation and connected as a local administrator, and then have pulled-up gpedit so that I could change the local user rights policy for "Refusal to logon via the Terminal Services" to remove the Everyone group. But the two buttons are grayed (add user or group, and delete). After reviewing several other local policy settings, I found that they also had their gray button. I then tried the same thing connected as a domain administrator. No joy. The same problem. I couldn't change the local policy settings through my domain administrator account or the local administrator account. So I checked the default domain and all policy policies assigned to the ORGANIZATIONAL unit in which resides the problem workstation account. All of these policies had the "Deny logon via the Terminal Server Services of' value 'undefined '.  Is it possible that one of our administrators changed the permissions on a registry key where the policy settings so that only he could change local policy on this box? Or is there another explanation?

    I found the solution. I had to give administrators complete control over HKLM\SECURITY. Once I made this change I could once more change local policy. Now, I need to implement a method to push this change for all our workstations...

    ICACLS?

  • How do I open a session with the local administrator account in Windows 8

    Hello

    About two weeks ago, I bought my laptop Dell Inspiron 15 inch 7000 Series that pre-installed with Win8 Japanese worm.

    Tried to download the Win8.1 from the store to Win, but asked me to identify a user with administrative privileges.

    When I booted up my laptop, it only prompted me to my Windows account (created this account I've first turning on my laptop).

    How can I change to log to the local administrator account when starting my laptop?

    Thank you

    Concerning

    Tom

    Thanks Shawn.

    Got my Windows 8.1 updated on my Dell laptop. Thanks for your help.

    Concerning

    Tom

  • Response of local folders looks like the answer to the discussion group. No signature or formatting options. How can I change the local folders meets regularly?

    Please see image attached. Responses from the eyes of local folders as responses to the discussion groups. No signature or formatting options. How can I change the local folders meets regularly, as they are in the Inbox?

    I don't think that the format of replies to the messages in the local folders are linked with focus groups or to individual account settings. As local folders can contain messages between several accounts or identities, it is more likely that formatting uses the setting of the account or identity appearing in the: field when you reply.

    This is how I think it should work. How this works in practice may be different.

  • user belongs to a domain and user does not belong to the local administrator or power users groups, or any custom group and the user is not part of the domain administrators group, but user show that it is admin

    WinXP
    user belongs to a domain and user does not belong to the local administrator or power users groups, or any custom group and the user is not part of the domain administrators group, but user show that it is admin

    I did a gpupdate/force and restart twice PC
    Yet, user indicate it is always admin when we right click on Start menu and see the possibility to open all users

    Hi elena_ad,

    Your question of Windows is more complex than what is generally answered in the Microsoft Answers forums. It is better suited for the public on the TechNet site. Please post your question in the below link:

    http://social.technet.Microsoft.com/forums/en/winserverManagement/threads

  • Windows Anytime Upgrade, you may need to change the locale

    I'm trying to upgrade Windows 7 Home Premium to Windows 7 Professional.

    I type "Windows Anytime Upgrade" in the search field and go to the Express upgrade window.  I click "go online to choose the best product...". "and then it shows a window saying that I"might need to change the locale.  The computer is in the United States, whose English is the default location.  It will not progress beyond this screen.

    Windows Anytime Upgrade is no longer functional as it is a product of the retail, Microsoft sells more retail licenses.

    Your best option is to an Express Upgrade card for any inventory or Professional upgrade Windows 7 use the retail purchase with Anytime Upgrade from Windows 7 Home Premium product key.

    Where can I still get Windows 7?

    Version upgrade - Microsoft Windows 7 Professional Upgrade

    Microsoft Windows 7 Anytime Upgrade (Home Premium to Professional) [Code online]

    If the license for Windows 7 Professional, you have access to is a retail version update or complete, you can use the product key and the Express upgrade to Windows 7 Edition Home Premium to Windows 7 Professional. First of all, check that the edition of Windows 7, you are upgrading is already enabled (if it isn't, you will encounter complications and that you might start all by performing a clean installation). Click Start, type Anytime Upgrade, click on the option enter a key, enter the key of Windows 7 Professional on demand, click Next, wait while checking the key, accept the license agreement, click on upgrade, wait while the software upgrades, (it may take 10 minutes or more depending on the if updates are required) your computer restarts automatically, after the reboot, Windows 7 will notify you updating the computer, the computer will restart once more automatically and will be completed the upgrade, a window will appear notifying the upgrade was successful and your computer is ready to use, click Close, you should be upgraded to Windows 7 Professional your files, programs and settings retained.

  • Win 7 bypass login screen and opens the local administrator account

    Having a laptop computer on the school network.  During the initialization of the logon screen is bypassed, and opens the local administrator account, which is not well with the children concerned.  Even in Safe Mode.  Laptop configured from an image by using Hyper-V, all others ok

    Hello

    Thanks for the reply.

    If you have any other questions relating to computers on the domain network, you can post questions in the Forums TechNet Networking Windows 7: http://social.technet.microsoft.com/Forums/en-US/w7itpronetworking/threads

    Thank you.

  • CRS-4124 after removing the local administrator account

    Oracle 11.2.0.3 EE

    ASM / Single Instance

    Windows Server 2008

    We have installed the Oracle Grid software and the database software using the local administrator of the windows operating system account. Later, the customer has deleted this account windows for security reasons. After that and rebooting the system, the Oracle does not start and displays the following errors:

    CRS-4124: Oracle high availability Services startup failed.
    CRS-4000: Start command has failed, or completed with errors.

    After you add the local administrator of the OHA succeeds to start. But we need a solution without a local administrator without having to reinstall the Oracle software.

    Thanks in advance!

    Wolfgang

    Hello Wolfgang,.

    You are not supposed to remove the user from the administrator that was used to install the software. You can lock that counts if him want, however, you do not delete the account

    Kind regards

    Vautrin - Oracle

  • How to change the main administrator in my CC team?

    How to change the main administrator in my CC team?

    Hello

    I'm afraid that the admin can be modified to your order at the time, but you can add more than one administrator console. You can also consider to reorganize with the correct email address.

    To add multiple administrators, see help here - manage your cloud creative teams membership

    ^ Ani

  • Change the main administrator of a teams CC account - Licens is purchased through resellers!

    Hello

    According to the guide, if the license is purchased through resellers we have the right to contact Adobe support for help to change the main administrator. Who can help me with this? I have a VIP number for the purchased license.

    Kind regards

    Erik

    Hi Erik,

    Would you suggest to contact customer service and choose the option which best describe your problem and then click always need help! Contact us.

    Concerning

    ~ David

  • Change the main administrator

    The lead Director on our account left, so it needs to be changed for me.

    I see that there is in "Team management", then "Licenses" Xs "remove users from this license." What is the way to do it?

    I read a lot of related issues. They all seem to conclude that it is impossible to do unless you contact support.

    Change the primary administrator

    How to move from the role of the Chief Executive to another Member of the team?

    I need to retire as the main administrator for a CC account and give way to another administrator. How should I proceed?

    Chief Executive Officer of change for the cloud team

    How to move from the role of the Chief Executive to another Member of the team?

    The purchase of the CC for the team is since Adobe store directly, in these purchases that the main Admin can not be changed however secondary admin can be added.

    There are certain privileges attached to the primary admin as your billing information console.

    You can cancel this CC & buy new CC team with the desired main admin. Members have just unassigned from their seat & then on purchase costs, they must send invite them again.

    Users must simply disconnect & reconnect once they accept the invite command new CTC.

    Concerning

    Baudier

  • 2008 R2 customization by changing the name of the local administrator to administrator account

    VMware View 4 on vSphere ESX 4 environment.

    Windows 2008 R2 Standard VM.

    Customization file used by VIC when VM deployment model.

    Local Admin account has been changed to "OscarAdmin".  When sysprep runs, it changes (or deletions / recreate) the only administrator Local "Administrator" account  We do not have the customization add new machine virtual domain but which shouldn't matter.  How do we stop Sysprep, invoked by the deployment of VIC VM, change "OscarAdmin"?

    Just add another account administrator, OscarAdmin.

    Let sysprep anything to do with the original account and use Group Policy to disable the default and just keep a new.

  • change the system administrator settings.

    I want to uninstall a program using the Control Panel, but am unable to do so, I get a message that the system administrator has set policies to prevent installation and also that you don't have sufficient access to uninstall the program and contact the system administrator.

    Kindly let me know a way to change the administrator or its policies/settings.

    Thank you

    The machine is joined to a domain, or is it a stand alone machine?  If the machine is on an area ask your domain administrator for help.  If it is a standalone machine, you need to make changes to the local security policy by using the Group Policy Editor, to start, the tool enter gpedit.msc in the run from the start menu.

    John

  • Change the Local C drive letters

    * Original title: assignment of drive letters

    When I installed Windows 7 (home edition) earlier, I tried to assign the letter D for the reader, but the installation process would not allow this and kept failing the letter C. can I change this to D now?

    The reason why I need to do this is that I have a program more former that works only under DOS and it will not run on any other drive except C.

    I have a 'plug-in' (auxiliary) drive that is already formatted for FAT32 and I want to give this the letter C so that I can run my BACK from that program.

    This sounds like a practical solution that can be made without too much trouble?

    Hello

     
    Thanks for posting your query in Microsoft Community.
     
    From your problem description, I understand that you want to change the drive letter to D of C, so that you can run a program under the C drive with DOS operating system.
     
    Unfortunately this action is not allowed because the current operating system, to which you have started is located on the Local C drive.
     
    If you want to know the method of assignment or change the drive letter, I suggest you open disk management and assign the drive letter and check.
     
    a. open computer management by clicking the Start button, click on the Control Panel, clicking system and security, clicking Administrative Tools, and then double-click computer management. If you are prompted for an administrator password or a confirmation, type the password or provide confirmation.
     
    (b) in the left pane, click Disk Management.
     
    c. If the hard drive is recognized in disk management and if there is no drive letter assigned, I suggest you do a right click on the drive and assign a drive letter and check if it helps.
     
    d. click on the player to change and then click on change drive letter and paths.
     
    Do one of the following:
     
    · To assign a drive letter if it has not already received, click Add, click the letter you want to use, and then click OK.
     
    · To change a drive letter, click on edit, click on assign the following drive letter, click the letter you want to use and then click OK.
     
    · To remove a drive letter, click on remove and then click Yes to confirm that you want to remove.
     
    Check this link for more information:
     
    Hope this information helps, just reply to the State of the question to get help.
  • Change the local iPhone backup file by default on PC

    I have a HP PC with Windows 10 House 11 flow. iTunes allows me to change my storage location of media on the F drive which is a 64 GB sd card. I don't see a way to change the phone backup file local saving by the c-drive location. I don't have enough space on the C drive to store the backup file for my 32 gb 5 C I found a support article on how to copy the backup file and move it in its entirety in order to not corrupt. I can't do this due to a lack of space on the SSD of 32 GB. Where iTunes to be saved.

    Is it still useful to keep a local backup file if you save on iCloud?

    Thanks for your suggestions.

    cptainv

    See moving backup iOS device.

    TT2

Maybe you are looking for

  • Small vibrations cause damage to Macbook Air?

    MacBook Air 13 "early 2015. When I work on my mac on different tables, a small movement can cause a small table vibration that makes Macbook screen, shake (very little, but when even he shakes). It is not very noticeable, but I was wondering if these

  • BlackBerry Smartphones mass storage controller driver?

    Hello, I installed my bb desktop software and when I plugged my phone into the computer it doesent connect... After spending more than an hour with verizons 'tech', he said that he could not help me... I tried the update and install the drivers with

  • Interactive form fields within a table

    HelloI use Indesign CC on a pc.I create interactive forms structured in a table.Forms are in the format of project and constantly evolving with the lines of the table of content added or deleted.How to anchor various checkboxes, radio buttons and tex

  • I am not able to install cs6 in my new windows laptop 10

    said: WARNING: DW066: a configuration OS not and DF029, DF012, ERROR: DW050:, etc.

  • Creative cloud updates fail to install on Yosemite

    Hi - I use CC on a MacPro with the latest version of Yosemite. When I try to use the CC updater to install a new version of one or the other of the programs it fails with the following message: "Update Failed - could not retrieve the downloaded son.