Change computer name using partial serial number

I'm starting to learn Powershell and I'm stuck trying to automate a computer name change. The code below works to rename the computer and reboot but I would like to shorten it and I'm not sure how. The serial number is 15 characters which makes the computer
name with the prefix added 18 charactes long. How can I modify it so that it takes the last 10 of the serial number plus the prefix? We are using Powershell 4.
The script changes the name to something like MCT1234567890ABCDE
What I would like is MCT67890ABCDE
$serial = Get-WmiObject win32_bios | select -expand serialnumber
$newname = "MCT" + $serial
Rename-Computer -NewName $newname -Force -Restart

Hi,
The serial number is 15 characters which makes the computer name with the prefix added 18 charactes long.
You might run into problems with this, considering there's a 15 character limit on NetBIOS names:
http://social.technet.microsoft.com/Forums/windowsserver/en-US/4fe7b148-a01f-498f-a88a-06aef3edd81e/what-is-the-maximum-length-of-a-computer-name-in-windows?forum=winservergen
http://support.microsoft.com/kb/909264/en-us
Just something to be aware of.
Don't retire TechNet! -
(Don't give up yet - 12,575+ strong and growing)

Similar Messages

  • Set Computer name by computers serial number ?

    Hi guys!
    I need a simple script or something to set computer name(serial number) and add computer to our domain. Computer name should be for laptop, LT-"serialno" and for Desktop it should be DT-"serialno"
    Is there a simple way to fix this? I have tried WSname, but no luck there. My scripting skills are equal with zero.
    Thx for all help and tips!
    /Janne

    HELP Add-Computer -FULL
    You need to start learning script somewhere.  We can help but we will not write scripts for you.
    Start here:
    http://technet.microsoft.com/en-us/scriptcenter/dd793612.aspx
    Look here:
    http://gallery.technet.microsoft.com/site/search?f%5B0%5D.Type=RootCategory&f%5B0%5D.Value=hardware&f%5B0%5D.Text=Hardware&f%5B1%5D.Type=SubCategory&f%5B1%5D.Value=basichardware&f%5B1%5D.Text=Basic%20Hardware%20and%20Firmware
    ¯\_(ツ)_/¯

  • I want to change my old computer by a new one. What about the Première Eléments License? Can I use the serial number on the new one? Thanks

    If I change my old computer for a new one, can I use the Serial Number License of Première Éléments  for the New one. Thanks for your answer. Daniel

    Daniel Yvelines
    More information is necessary to give you an answer that applies to your specific situation.
    1. What version of Premiere Elements is involved and on what computer operating system is it running now and on what computer operating system will it be running on the second (new) computer?
    2. How did you set up your first computer....purchased online download from Adobe to Window 7 64 bit, followed by install there OR installation from Premiere Elements installation disc purchased in box packaging?
    True, Adobe allows a purchased serial number for a given version to be activated on no more than 2 of your computers.
    That is a critical consideration. But in itself that becomes moot if other factors do not fall into place.
    Looking forward to your follow up details.
    Thank you.
    ATR

  • I would like to put Dreamweaver 8 on a new computer.  There is no "deactivate" function and the technical support person I chatted with recommended I come here.  Can I just use the serial number again?  How can I deactive?  Has anyone else run into this?

      There is no "deactivate" function and the technical support person I chatted with recommended I come here.  Can I just use the serial number again?  How can I deactive?  Has anyone else run into this?  How can I get Dreamweaver 8, which is no longer being activated by Adobe, on a new computer?  Is it even worth doing or do I need to get a new version.  What are the killer features I'm missing?

    If you manage to get it installed on your current OS, don't forget to install the 8.02 update.
    Adobe - Dreamweaver Support Center : Updaters
    Nancy O.

  • I purchased Adobe Acrobat XI Pro on a CD but didn't realize that my new computer doesn't have a CD drive. Is there a way to download via the web using the serial number on my CD?

    I purchased Adobe Acrobat XI Pro on a CD but didn't realize that my new computer doesn't have a CD drive. Is there a way to download via the web using the serial number on my CD?

    Downloads available:
    Suites and Programs:  CC 2014 | CC | CS6 | CS5.5 | CS5 | CS4 | CS3
    Acrobat:  XI, X | 9,8 | 9 standard
    Premiere Elements:  13 |12 | 11, 10 | 9, 8, 7
    Photoshop Elements:  13 |12 | 11, 10 | 9,8,7
    Lightroom:  5.7| 5 | 4 | 3
    Captivate:  8 | 7 | 6 | 5
    Contribute:  CS5 | CS4, CS3
    Download and installation help for Adobe links
    Download and installation help for Prodesigntools links are listed on most linked pages.  They are critical; especially steps 1, 2 and 3.  If you click a link that does not have those steps listed, open a second window using the Lightroom 3 link to see those 'Important Instructions'.window using the Lightroom 3 link to see those 'Important Instructions'.

  • We just downloaded the Creative Suite 6 onto our computer, but it says that the serial number is incorrect. Do we use our serial number from CS5.5 because that didn't work?

    We just downloaded the Creative Suite 6 onto our computer, but it says that the serial number is incorrect. Do we use our serial number from CS5.5 because that didn't work?

    Creative Suite 6
    Click the Buy link for the Suite you want to upgrade to.
    I want to buy: <select Upgrade>
    I own: <select the CS5.5 product you already own>
    Platform: <select Mac or Windows>
    Complete your CS6 upgrade purchase.
    Note that CS6 is superseded software and will receive no further upgrades or updates. Adobe has stopped working on CS6.
    Adobe now promotes their Cloud memberships. So consider subscribing to an Adobe Cloud membership if you want up-to-date software which will be upgraded regularly.

  • How do I deactivate a serial number on old computers (that don't work) in order to use the serial number on the new computer?

    How do I deactivate a serial number on old computers (that don't work) in order to use the serial number on the new computer?

    Hi Amy,
    Please take a look at this document, for information about deactivating/reactivating an Adobe product:  Activation & Deactivation Help - Adobe.
    If you have additional questions, please let us know!
    Best,
    Sara

  • If I have a hard copy of Lightroom, can I use my serial number to get a digital download?  My new computer (PC) doesn't have a disk drive.

    I have a hard copy (disk) of Lightroom 5.  I just bought a new computer (PC) that doesn't have a disk drive.  Can I obtain a digital download using the serial number I already have?

    install lr 5.7.1 directly instead of installing lr 5 and updating.
    Downloadable installation files available:
    Suites and Programs:  CC 2014 | CC | CS6 | CS5.5 | CS5 | CS4, CS4 Web Standard | CS3
    Acrobat:  XI, X | 9,8 | 9 standard
    Premiere Elements:  13 | 12 | 11, 10 | 9, 8, 7 win | 8 mac | 7 mac
    Photoshop Elements:  13 |12 | 11, 10 | 9,8,7 win | 8 mac | 7 mac
    Lightroom:  5.7.1| 5 | 4 | 3
    Captivate:  8 | 7 | 6 | 5.5, 5
    Contribute:  CS5 | CS4, CS3
    Download and installation help for Adobe links
    Download and installation help for Prodesigntools links are listed on most linked pages.  They are critical; especially steps 1, 2 and 3.  If you click a link that does not have those steps listed, open a second window using the Lightroom 3 link to see those 'Important Instructions'.

  • I tried to reinstall photoshop elements on my Mac with my serial number,  because my computer crashed and I lost Elements.  Why was the  response was that I could only use the serial number once?

    Hi,
    My computer crashed.  I have a Mac OS X Yosemite.  I tried to reinstall photoshop elements 13 with the correct serial number, but got the message that I can only use the serial number o@nce.  How can I reinstall this product? !

    your serial number never expires (unless it's made public and is black-listed).
    redemption codes however, do expire.

  • Difficulty changing computer name and domain name

    I have a working Xserve with the latest Snow Leopard Server and am having difficulty reconfiguring it from its keyboard.
    I would like to edit the computer name and domain name and maintain all other server settings. I would prefer to do this off-line. However Server Admin appears not to work off-line and any attempt to change computer name or domain name removes all server settings from view including the serial number. I can recover everything by reinstating computer name etc and restarting on-line.
    Is the serial number tied to the computer name and/or domain name?
    Is there any way to retain my existing server settings for a different domain?
    Is there any way to progress any of this off-line?

    This has now been resolved. This note is to assist others who have the same problem.
    1 - I had been changing the computer name in the place I had always done it - System Preferences/Sharing. This confused Server Admin. Reverting to the original name and changing computer name and location within Server Admin resolved the issue. That is System Preferences/Sharing is updated by Server Admin but not vice versa.
    2 - Playing with these things can corrupt Server Admin plist resulting in a restarted Server Admin not seeing the edited server even with the server otherwise fully functioning. Trashing Server Admin plist resolved this for me without loss of server settings.
    3 - Having set it up off-line I experienced difficulty as soon as I went on-line. This was resolved by changing the server from 'local' to its full domain name. I have no explanation for this as the same settings had previously worked with 'local'.
    4 - Server Admin can take a long time to find settings and occasionally failed to do so until after a restart.
    The result can be seen here: http://links.open.ac.uk/ - Since Apache refuse to provide hit counter support (there are several public posts of mine on the subject) I use JavaScript to retrieve the count from an old QPQ server running on a G3 with OS 9.

  • HELP ASAP!! PSE5 "elements user name organization or serial number is missing or invalid.  thsi application cannot continue and must now exit

    HELP!!!!  I am a graphic designer I LOVE my version of Photoshop elements 5... I am also a Mom of two who depends on my party supply business as my only income currently!!!! 
    Upon opening to work on a party supply order DUE TODAY for a kid's first birthday I got this ERROR MESSAGE:
    "Your adobe photoshop elements user name organization or serial number is missing or invalid.  This application cannot continue and must now exit"  And then closes.....
    I don't know where my disc is to uninstall/reinstall since I got this program Oh say 10 years ago....  WHAT DO I DO!!?  I am in complete PANIC mode!
    Anyone?! Chat said they couldn't help me it's too old?!?!  HELP

    Hello ...Mom,
    here you will find (if stored at Adobe) "General infos about your Adobe Account" https://www.adobe.com/account.html. To see what Adobe has saved about your serial number, please have a look there: http://helpx.adobe.com/x-productkb/global/find-serial-number.html.
    On the other hand you could use a non Adobe program, like
    Belarc Advisor - Free Personal PC Audit, for software, hardware and security configuration information on your computer.…
    If necessary and for further questions click through http://helpx.adobe.com/contact.html and if "open" please use chat, I had the best experiences. I quote from Adobe's employee Preran: The chat button is activated as soon as there is an agent available to help.
    Good luck!
    Hans-Günter

  • User Name, Organization, or serial Number not valid

    I have windows 8
    I own 4 disc Creative Suites 2.0
    I installed the program.
    All programs open but Photoshop.
    I get the Error: "Your Adobe Photoshop user name, organizaiton, or serial number is missing or invalid. The application cannot continue and must now exit."
    I uninstalled it.
    Installed the online free version.
    Same error.
    Uninstalled that, and reinstalled my version.
    Looked for the the database file expressed in solution 4 of the following web page
    http://helpx.adobe.com/photoshop/kb/startup-error-photoshop-cs2-mac.html
    Can't find the file they are talking about.
    Need some help. Don't want to upgrade. Paid a lot of money for this version and I know it inside and out.
    Just want to use it only.
    Thanks for any help.
    It worked a week ago by the way... Not sure what has happened for this to start up....
    Thanks,
    Jeff

    I found the fix:
    Uninstall all versions of Adobe cs2
    When prompted for the install location you need to know what the "Updated Syste" is calling your install directory.
    Most of the time it is:       PROGRA~2
    So you need to change your install location to : 
    c:\PROGRA~2\Adobe
    Then go through the rest of the install as normal and BAM! Photoshop will work without anymore errors.
    Thanks to this article I was able to figure it out:
    http://planetmediocrity.com/2013/01/installing-photoshop-cs2-on-windows-7-64-bit/
    If only the people at Adobe help centers were this educated....
    I like to buy software and use it. NOT keep buying software updates and upgrades. Especially when the software is between 600 and 1000 dollars. For those prices it should ALWAYS work.

  • Cs2/Windows 7x64 - User name, organization, or serial number is missing or invalid?

    Ok, I'm at my wits end on this one.  I've installed and reinstalled this CS2 suite multiple times, tried to find the proper registry keys, pretty much anything i can think of to get this to work, but every time I go to boot up one of the programs in the suite (such as Photoshop) I get an error stating "Your Adobe Photoshop user name, organization, or serial number is missing or invalid.  The application cannot continue and must now exit".  There is only an OK box, and absolutely no way for me to look at the licensing information to see what it's getting hung up on.
    I've confirmed everything is correct upon installation.  I can't find an e-mail address for Adobe's customer support so I'm asking you guys - what the hell is going on with this software?  Anyone fix this before?

    @exshopper
    A few quick items:
    (1)     I genuinely hope you find satisfaction with PaintShop Pro and that it meets your needs, whatever they are.
    (2)     Bob Levine is not and has never been an employee of Adobe Systems Incorporated. He does speak his mind and certainly lets Adobe know when our products and policies need improvement. Without attempting to put words in his mouth, I think you may be objecting to the fact that he does understand the needs of software developers in terms of marketing and supporting their products and the value of same to customers. He does rightly point out that the monthly subscription costs for the tools they use to earn their living usually amount to far less expenditure than many if not most creative professionals spend each day on their favorite beverages. There is still a major failure of many computer users to comprehend the cost of development and support of software simply because software isn't “tangible” in the way computers, printers, and other peripherals are.
    (3)     When you refer to purchasing “the CS2 suite for 1500 pounds (over $3000 back then)” I assume that you are referring to the Creative Suite 2 Premium which included every creative product that Adobe had at the time including InDesign, Illustrator, Photoshop, GoLive, Version Cue, Bridge, Acrobat, etc. The “back then” was early 2005, nearly a decade which is an awful long time in this industry. If you “bought” the product more recently than eight years ago, much less five years ago, you already were purchasing something that was no longer current. And you certainly could not have purchased it from Adobe.
    (4)     I am sorry to read that your “computer died.” Was that computer nine years old? To be consistent with your expectations of Adobe, hopefully you expected your computer's manufacturer to continue to support that computer with a free or reduced cost repairs and/or replacement because you spent so much money on that computer. And of course you expected that new computer would run the exact same OS as your dead computer and support all your old peripherals including SCSI drives, diskettes, etc.
    (5)     Whether you or even I like it or not, the subscription model better reflects the reality of development, distribution, and support of software. Under the previous “perpetual license” scheme, you paid for a license to use the software for perpetuity on the hardware and software (i.e., OS) platforms for which it was developed and tested, nothing more. Unfortunately, the expectations of many of our customers was that somehow Adobe would provide free updates to their current program versions to provide support for future incompatible hardware and operating system platforms. However, that is a totally untenable business model. In contrast, many high end software applications (not graphic arts applications) not only charge for a license, but have a requirement for payment of either a monthly or annual maintenance contract which cover most such hardware/OS upwards incompatibility contingencies. The subscription model currently in-place basically eliminates the up-front licensing and a maintenance contract with a simple monthly fee that provides access to all updates and upgrades. It is fairly clear and simple.
    (6)     In terms of your costs over time, you didn't indicate which aspects of “CS2 suite” you were using, but given your apparent emphasis on image editing, Adobe does offer a very attractive subscription that includes both Lightroom and Photoshop.  Even if you don't use Lightroom at all, it is still a great price even just for Photoshop.
              - Dov

  • How to track my stolen ipod only using the serial number

    I had my iPod stolen from me sometime within the last week. I changed my iCloud password tonight & I was just wondering if there is any way I can track it using the serial number because I did not set up "find my iPhone" before it was stolen. It was not locked (the password when you first turn it on.) Please help me! I still have one year warranty on it too. Can anybody tell me how to go about fixing the problem? I have serial number if you can track it that way. Please get back to me with your responses asap . thx

    No. The SN will only help idenitfy the iPod as yours if it is recovered.
    lost/stolen                                     
    No app on the iPod is required.                           
    - If you previously turned on FIndMyiPod on the iPod in Settings>iCloud and wifi is on and connected, on a computer browser go to iCloud: Find My iPhone, sign in and go to FIndMyiPhone. If the iPod has been restored it will never show up or continue to show off-line.
    - You can also wipe/erase the iPod and have the iPod play a sound via iCloud.
    iCloud: Erase your device
    iCloud: Use Lost Mode
    - If not shown, then you will have to use the old fashioned way, like if you lost a wallet or purse.
    - Change the passwords for all accounts used on the iPod and report to police
    - There is no way to prevent someone from restoring the iPod (it erases it) using it unless you had iOS 7 on the device. With iOS 7, one has to enter the Apple ID and password to restore the device.
    - Apple will do nothing without a court order                                               
    Reporting a lost or stolen Apple product                                              
      - iOS: How to find the serial number, IMEI, MEID, CDN, and ICCID number

  • Can i use my serial number to locate my ipod?

    lost my iPod... Not sure if its in my house or its lost for good... But I was wondering if I could search for it using the serial number sice I did not hook it up with icloud. I

    No, the SN will onlyhelp identify the iPod as yours if it is recovered
    lost/stolen                                      
    No app on the iPod is required.                            
    - If you previously turned on FIndMyiPod on the iPod in Settings>iCloud and wifi is on and connected, on a computer browser go to iCloud: Find My iPhone, sign in and go to FIndMyiPhone. If the iPod has been restored it will never show up.
    - You can also wipe/erase the iPod and have the iPod play a sound via iCloud.
    - If not shown, then you will have to use the old fashioned way, like if you lost a wallet or purse.
    - Change the passwords for all accounts used on the iPod and report to police
    - There is no way to prevent someone from restoring the iPod (it erases it) using it unless you had iOS 7 on the device. With iOS 7, one has to enter the Apple ID and password to restore the device.
    - Apple will do nothing without a court order                                                        
    Reporting a lost or stolen Apple product                                               
      - iOS: How to find the serial number, IMEI, MEID, CDN, and ICCID number

Maybe you are looking for