Categories
How-To Software Technical

Renaming SharePoint 2013 Server

I spent sometime today renaming SharePoint 2013 Servers for a project I was pulled in on. It involved using PowerShell cmdlets and other administrative tasks.

The project required me to “Clone” SharePoint farm servers to make template environments for demonstration and development task.

I originally followed steps provided here: Renaming SharePoint then later streamlined the process so its something I found useful. Here are my notes saved in PowerShell format so it could be run step by step using PowerShell ISE:

 

# 2015-04-29 - Jermal Smith (jermsmit@gmail.com)
#
#
# Renaming Sharepoint Server
#
# --- DO NOT RUN THIS AS A SCRIPT
# Exiting Script if run
Exit
#
#
# Please log into the server as the Farm Admin Account
# Steps provided are for SharePoint 2013
#
# Adds SharePoint powershell snap-ins to current session
Add-PSSnapin Microsoft.Sharepoint.Powershell
#
# Removes SharePoint Distributed Cache Service
Remove-SPDistributedCacheServiceInstance
#
# Displays current SharePoint Identities
Get-SPServer
#
# Rename SharePoint Server Identity [old_name to new_name]
Rename-SPServer -Identity "original" -Name "new"
#
# Error will show: 
# Object reference not set to an instance of an object.
# Ignore this
#
# ---------------------------------------------------
# --- REMOVE SERVER FROM NETWORK
# --- REMOVE SERVER FROM DOMAIN
# --- REBOOT SERVER
# --- LOGIN WITH LOCAL ADMIN USER
# --- RENAME SERVER
# --- REBOOT SERVER
# --- LOGIN WITH LOCAL ADMIN USER
# --- ADD SERVER TO NETWORK
# --- JOIN SERVER TO DOMAIN
# --- REBOOT SERVER
# --- LOGIN WITH DOMAIN ADMIN USER
# ---------------------------------------------------
#
#
#
# Adds SharePoint powershell snap-ins to current session
Add-PSSnapin Microsoft.Sharepoint.Powershell
#
#
#
# Change Alternate Access Mapping for Central Admin Site
# Use Get-SPAlternateURL to List Alternate Access Mapping URLS
#
New-SPAlternateURL -WebApplication http://original:8000 -Url http://new:8000 -Zone Default
#
# --------------------------------------------------------------------------------
# Run this command for each mapping you want to change or via Centeral Admin Later
# --------------------------------------------------------------------------------
#
# --------------------------------------------------------------------------------
# Change Directory to the following: *use the standard command prompt as admin
# C:\Program Files\Common Files\microsoft shared\Web Server Extensions\15\BIN
#
# Run the following command:
# psconfig.exe -cmd upgrade -inplace b2b -wait -force
# 
# This command will wake a short while to complete
# --------------------------------------------------------------------------------
# 
# Enable SharePoint Distributed Cache Service
#Add-SPDistributedCacheServiceInstance
# If run the following error is given:
# Failed to connect to hosts in the cluster
#
#
#
# Apply Rules and Restart SharePoint Timer Jobs
Get-SPTimerJob | where {$_.Title -like "Health Analysis Job*"} | Start-SPTimerJob
#
# Now enter Central Administration and correct the access mappings
#
# --- DONE ----
#

Best,

Jermal

One reply on “Renaming SharePoint 2013 Server”

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.