Giter VIP home page Giter VIP logo

psrename's Introduction

PSRename

Scripts to rename workstation they are prepared by Intune Autopilot in Hybrid Azure AD Join. App renaming device based on Device Name from Windows Autopilot devices list. Devices โ€“ Enroll devices โ€“ Devices - select device - Device Name field

Many thanks to MICHAEL NIEHAUS. Solution was based on: https://oofhours.com/2020/05/19/renaming-autopilot-deployed-hybrid-azure-ad-join-devices/

Prepare Active Directory

Delegate access to SELF for "Read All Properties" and "Write All Properties" to OU with autopilot devices

Build an app

.\IntuneWinAppUtil.exe -c ..\App -s install.cmd -o ..\IntuneApps

Create an app

Next add Windows app (Win32) and load install.intunewin file.

Install command: install.cmd

Uninstall command: uninstall.cmd

Install behavior: System

Params

In install.cmd we will start main app script. Script can use additional param: -Strict - Strict mode will use exact device name from profile, without any sufix if name is used. But it may generate error if device name exist in AD.

Additional requirement

Additional requirement detects if new device name exist in profile settings, device is part of domain and aktually device have connection to domain controller. If not, app is not applicable for now.

Additional requirement rules: Script PSRenameReq.ps1

Select output data type: Boolean; Operator: Equals; Value: Yes ($true)

Detection rules

Detection rules check if current name is different from new.

Detection rules: PSRenameDetector.ps1

Assignments

Required but not in autopilot proces. It must be excluded from ESP - we dont want to reboot device in autopilot process.

App will start when autopilot ends and device connect to corporate network. If we dont have connection to corporate network, Intune try to start it later.

psrename's People

Contributors

mgajda83 avatar

Stargazers

 avatar

Watchers

 avatar  avatar

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.