Faronics Deploy Docs
Deploy HomeDeploy Sign inSubmit a ticket
  • About Faronics Deploy
  • Highlights
    • Top 10 Trending Topics
    • What's New?
  • Getting Started
    • Quick Start Guide
      • System Requirements
      • Initial Setup and Configuration
        • Sign Up - Create a Faronics Deploy Account
        • Download and Install Deploy Agents
          • Windows Install Guide
            • Download MSI Installer to Deploy via Active Directory
          • Mac Install Guide
        • Login to Deploy for the First Time
        • Configure User Profile and Organization Settings
          • How to Configure your User Profile
          • How to Configure your Organization Settings
        • Add Administrators - Invite your Team and Assign Roles
        • Manage Tags
          • Apply a Tag
    • Navigating the User Interface
      • Deploy User Interface Views
        • Control Grid
          • Dashboard View
          • Applications View
          • Windows Updates View
          • OS Deployment View
          • Anti-Virus View
          • Inventory View
          • Policies View
        • Analytics
          • Applications View
          • Usage Reports View
          • Windows Updates Status View
          • Anti-Virus Reports View
          • Deploy Diagnostics View
        • Tickets View
        • Tasks View
      • Using the Control/Smart Grids
      • Using the Action Toolbar
      • Computer States and Actions
        • Handling Offline Computers
        • Wake-On-LAN
          • Designate Last Man Standing (LMS) computers
      • Light Mode/Dark Mode View
  • Feature Definitions and Glossary
  • Action Toolbar
  • App Preset
  • Custom App
  • Policies (Windows)
  • Policies (macOS)
  • Policy Update Mode
  • Application Management
    • Applications Overview
    • Navigating the Applications Control Grid
    • Cache Server: Save Bandwidth
    • Groups Configuration
      • Create a Group
      • Delete a Group
      • Add Computer(s) to a Group
        • Assign a Computer to a Group via the Deploy Agent Download and Install
        • Assign Computers to a Group After they Appear in the Dashboard
        • Group Computers Using a Naming Convention
        • Group Computers Based on Criteria in Inventory
      • Perform Actions on a Group of Computers
        • Perform Actions via the Action Toolbar on a Group of Computers
    • Install, Uninstall & Update Applications
      • Install Application(s)
        • Install Built-In Application(s)
        • Install an Application on All Computers in Deploy
        • Install an Application Using Winget
          • Enable and Install Winget
          • Install an Application Using the Winget Tool
        • Install an External Application (Custom App)
          • Create and Install a Custom App
            • Hosting a Custom App - URL or Network Path
          • Edit a Custom App
          • Copy a Custom App
          • Request Assistance From a Deployment Specialist
          • Example: Installing MS Office 365 as a Custom App
        • Install a Pre-Defined Group of Applications (App Presets)
          • Create an App Preset
          • Install an App Preset
          • Manage App Presets
        • Install an Application on a Group of Computers
        • Schedule an Install of Application(s)
          • Schedule an Install of an Application
          • Schedule an Install of Multiple Applications
      • Uninstall Application(s)
        • Uninstall an Application From a Group of Computers
        • Uninstall an Application From all Computers
        • Schedule an Uninstall
      • Update Application(s)
        • Performing Updates On-Demand
        • Update via Apps with Recent Updates Grid
        • Update Applications Using Policy Modes
    • Application Management for macOS
      • Install Application on macOS
        • Install Built-In Application(s) on macOS
        • Install a Custom App (External) on macOS
          • Create and Install a Custom App on macOS
      • Update an Application on macOS
      • Uninstall Application on macOS
      • Shell Scripts on macOS
  • WINDOWS UPDATES
    • Navigating the Windows Updates Control Grid
  • Manual Windows Updates Approval
    • Manually Approve All Windows Updates for All Computers (Install All Updates)
    • Manually Install Windows Updates on a Group of Computers
    • Manually Approve a Windows Update Category (in a Policy) for all Computers
    • Manually Approve an Individual Windows Update in a Policy for All Computers
    • Manually Approve or Deny Individual Windows Updates via Pending Windows Updates
    • Patch Scan (On-Demand)
  • Automated Windows Updates Approval
    • Automated Windows Updates Using Policies
    • Automated Windows Updates Use Case: Testing Patches
    • Patch Scan (Using a Policy)
  • OS DEPLOYMENT
    • Navigating the OS Deployment Control Grid
    • Imaging Utility Requirements
    • Getting Images Ready for Deployment
      • Loading Images from ISO Files
        • Download and Install the Faronics Deploy Imaging Server Tool
        • Loading ISO Image Files via the Faronics Deploy Imaging Tool
      • Building Images for Deployment - Template Machine
    • Capturing Images
    • Deployment Packages
      • Deployment Package Install Settings
    • Post Imaging Actions
    • USB Media Creator
      • Generate a Portable USB Creator (Used to Create a Recovery USB Drive)
      • Create a Recovery USB Flash Drive from a Portable USB Creator
    • Inject Drivers into the boot.wim File
    • Abort the Sysprep Task
  • OS MANAGEMENT
  • OS Management Overview
  • Create a Configuration
    • System and Security
    • Network and Internet
    • Hardware
    • User Accounts
    • Appearance and Personalization
    • Clock and Region
    • Ease of Access
    • Others
  • Apply a Configuration to a Group of Computers
  • Custom Scripts - PowerShell, VB, Batch, Executable [.exe]
    • Custom Scripts Library
      • Quick Guide to Self-Hosting Custom Scripts
      • Send Message
      • Rename Multiple Computers
      • Show All Notification Icons
      • Hide Task View
      • Hide Recent Apps
      • Hide People Taskbar
      • Disable Cortana
      • Google Chrome Ad Blocker Extension
        • Create a Custom Script to Install any Google Chrome Extension
      • Uninstall Windows Updates
      • Auto Logon
      • Disable the UltraVNC System Tray Icon
      • Install Printer Driver Silently
  • Policies - Scheduling and Automation
    • Update modes - Automatic, Scheduled, Adhoc
    • Create a Policy
      • Create a Windows Policy
      • Create a macOS Policy
      • Create a New Policy (MDM)
        • Global Settings (MDM)
    • Maintenance Mode
    • End-User Experience: Defer Updates and Reboots
    • Protecting the Deploy Agent
  • ANTI-VIRUS & FIREWALL
    • Faronics Anti Virus & Firewall Protection Configuration
      • Anti-Virus Settings
      • Firewall Settings
      • Computer Settings
  • Upgrade Anti-Virus Software
  • Restore or Delete Quarantined Files
  • INVENTORY
    • Inventory
      • View Details
    • Organize Computers Using Inventory Data
    • Retrieve MSInfo Reports Using the Deploy Console
    • Inventory Data Update - Heartbeat + On-Demand
    • Quickly View Installed Applications
    • Organize Inventory by Active Directory Group Membership / Organization User Membership
  • ANALYTICS
    • Usage Statistics Reports
      • Application Usage Report
      • Application Update Status Report
      • Installed Applications Report
      • Computer Usage Report
      • Login Summary Report
      • Windows Update Status Report
  • REMOTE ACCESS - RDP / VNC
    • Remote Access Requirements - Ports and Networking
    • Remote Pro
    • VNC - Initial Setup
    • Using VNC - Virtual Network Computing
    • Using RDP - Remote Desktop Protocol
    • Remote View the Screen of a Computer (Configure Refresh Rate & Monitor Selection)
  • TASKS
    • Task History
    • Scheduled Tasks
      • Assign a Scheduled Task
      • Delete a Recurring Scheduled Task
      • Cancel a One Time or Recurring Scheduled Task
    • Schedule a One Time Task
    • Schedule a Recurring Task
    • Schedule a Custom Script to Run on Every Reboot
  • Help Desk Tickets
    • Enabling Ticketing
      • Enable Ticketing for Your Organization
        • Enable Email Alerts for Incoming Tickets
      • Enable Ticketing for a User
      • Ticketing Emails
    • Ticket Actions
      • Create a Ticket
      • Edit a Ticket
      • Add a Note to a Ticket
      • Assign Ticket (To a User)
      • Assign Owner (To a Ticket)
      • Change Status of a Ticket (Open, In Progress, Closed)
      • Download a File Attached to a Ticket
      • View a Ticket
      • View History
      • Export a Report of All Tickets to a CSV File
      • Remote Access a Computer via a Ticket
    • Ticketing - Mapping Email IDs
    • Fair Use Policy - Ticketing
  • User Management
    • User Roles
    • Add Users
      • Add a User via Email
      • Add a User/Group via Active Directory
    • Configure SAML (Verify Users for External Applications)
  • Organization Settings
    • 2FA - Two Factor Authentication
    • Accessibility
  • Mobile Device Management
    • Overview
    • Device Configuration
      • MDM Set up
      • Enroll Standard Device
        • Mobile Browser
        • iOS App
        • Apple Configurator
        • Email
      • Enroll Lite Device
    • Apple Devices
    • Apple Lite Devices
    • Apps & Docs
      • Applications
      • Shared Documents
    • Settings
      • Networks
      • Personalization
      • Accounts
    • Device Actions
    • Action Toolbar
Powered by GitBook
On this page
  • PowerShell Script
  • Custom Script Settings
  • Optional Changes to Make to the PowerShell Script
  • How to Create a Custom Script to Rename Multiple Computers
  1. Custom Scripts - PowerShell, VB, Batch, Executable [.exe]
  2. Custom Scripts Library

Rename Multiple Computers

A Custom Script to rename multiple computers using a hash table and rebooting after imaging.

PreviousSend MessageNextShow All Notification Icons

Last updated 4 years ago

PowerShell Script

The following is the Rename Multiple Computers sample PowerShell script. Copy it and save it as a .ps1 file. For further information on hosting this script see .

$namelist= ConvertFrom-StringData -StringData $args[0]

if ($namelist.ContainsKey($env:computername)) {
Rename-Computer -NewName $namelist[$env:computername] -Force -Restart
}

Custom Script Settings

The table below outlines all the fields that need to be set when creating this custom script.

For a detailed guide, refer to .

Field

Value

Name

Rename Computers with Hash Table and Reboot

URL

Type

PowerShell

Command-Line

Enter the name of the computer and the name to change it to separating the with the = symbol, each entry on a new line, using the format "ComputerNameFrom=ComputerNameTo" <Enter> used as line separator e.g.

"DT23432_23r=DESKTOP1

DESKTOP353=DESKTOP2

LENOVO2154=LAPTOP1"

Run As

System Account or Specified User Account

Optional Changes to Make to the PowerShell Script

Change Description

Change

Reboots Instantly after Rename.

Remove -Force -Restart from the script to prevent an instant restart.

How to Create a Custom Script to Rename Multiple Computers

1. Select the Control Grid tab on the top menu bar.

2. Navigate to the Applications tab.

3. Click CUSTOM SCRIPT.

4. Select Create Custom Script.

5. Enter a Name for the script, Rename Computers with Hash Table and Reboot in this example; use any name you'd like to use.

7. Select the script type: Powershell.

8. Command Line: Enter the computers' names that you wish to rename together with the new name, separating the current name and new name with an = symbol. Each pair of names must be on a new line using <enter> as a line separator.

e.g. "ComputerNameFrom=ComputerNameTo" <Enter>

The following is an example of three computers being renamed:

9. Select the account to Run As; either System Account or Specified User Account.

10. Click SAVE TO GRID.

Once saved, the script can be pushed to an individual computer or groups of computers. It can also be scheduled using a Policy.

The script will now appear in the list of Custom Scripts. It will also be available to select from the Applications Control Grid View.

Search for the script in the grid using the search option. If your applications are grouped, you will see a column named Custom Scripts. Selecting the Custom Script header will display all the scripts that have been added to the grid.

The following change is optional, download the script from , make your changes, then host it (this will change the URL in step 6 below). See the for more information.

6. Enter the URL that points to the hosted script in this example. You might need to download this file and host it on a link that is whitelisted in your firewall.

Best Practice is to download the sample script and self-host it. You can do this for free with GitHub. See the for more information.

For a guide on how to run your custom script, see .

http://www.faronics.org/rename_reboot_hash.ps1
Quick Guide to Self-Hosting Custom Scripts
http://www.faronics.org/rename_reboot_hash.ps1
Quick Guide to Self-Hosting Custom Scripts
Quick Guide to Self-Hosting Custom Scripts
Create a Rename Multiple Computers Custom Script
http://www.faronics.org/rename_reboot_hash.ps1
Pushing the Script
Create a Custom Script
Create Custom Script to Rename Computers with Hash Table and Reboot
Renaming 3 Computers