Code Monkey home page Code Monkey logo

renamecomputer's People

Contributors

mtniehaus avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

renamecomputer's Issues

Access is Denied

Hi @mtniehaus ,

I get an error message when i try to run the script.
I have created a separated OU and placed the computer objects there to be renamed.

Kindly suggest.
access is denied

Regards,
Moses

Request: Add computer name verification

This is a genuinely nice script. :)
May I request you to amend one more check along with AD connectivity & domain join status check, script should check the computer name as well. If a computer's name matches, then only rename the computer.

If computer name starts with "XYZ-*" then only rename the computer.

Just a loud thought if I deploy this script to all existing devices (converting devices to autopilot) should not rename these devices. So, to avoid this requesting change.

Many thanks.

Would/Could you not run this as a Remediation?

Couldn't the .ps1 just be run as a remediation? Give or take a bit of detection tweaking -- I mean, the logic is already in there really... Or am I missing something?

I suspect the creation of this solution pre-dates remediation...??

...Or, is it an App so that it can run during OOBE? (and therefore if I'm happy to run post OOBE, I can proceed as a script/remediation, with the relevant parts of the .ps1...)

Can we specify the computer name manually?

We have a strict requirement to name our computers a certain format and none of this is derived from data available on the machine (its not serial based where we can just look inside the BIOS using WMIC).

Is there a way to prompt for a computer name and use that?

Get-ComputerInfo for bios serial number

Get-ComputerInfo actually returns with a typo for BiosSerialNumber. It returns BiosSeralNumber. So the serialnumber cant be fetched if Get-CimInstance doesnt have a assettag. So either edit the script to fetch serial number from ciminstance bioselement or add the typo into get-computerinfo.

Second try

Is it possible to keep the scheduled task even the object is in Active Directory present? So, i can delete the old AD object manually and the script can run again.

Script might hang due to Netbios / 15 char

I changed the rename portion of the script to suit my needs and ran into an issue where the script would spin indefinitely on 'Installing' .. turns out some of my computer names exceeded the 15 char netbios limit and was throwing up a confirmation box.

To address this, add -Force to the end of the Rename-Computer command:

Rename-Computer -NewName $newName -Force

ScheduleTaskTrigger RandomDelay

The following commands don't add the -randomdelay value to the trigger.
$triggers += New-ScheduledTaskTrigger -AtLogOn -RandomDelay $timespan
$triggers += New-ScheduledTaskTrigger -AtStartup -RandomDelay $timespan

Should be:
$triggers += New-JobTrigger -AtLogOn -RandomDelay $timespan
$triggers += New-JobTrigger -AtStartup -RandomDelay $timespan

Creating the intunewin

Not an issue per say, but some confusion. How did you create the Intune file? I had to adjust a few things as the name was coming back null. But when I create the Intune file, its like 6gb and won't import.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.