# Rename Virtual Server

**URL:** <https://community.f5.com/t/rename-virtual-server/43876>\
**Category:** Technical Forums\
**Tags:** icontrol, devops, microsoft-powershell-with-icontrol, microsoft\
**Created:** [August 7, 2012, 2:45pm UTC](https://community.f5.com/t/rename-virtual-server/43876 "2012-08-07T14:45:13Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![tharrison\_91509](https://avatars.discourse-cdn.com/v4/letter/t/f17d59/32.png) [@tharrison\_91509](https://community.f5.com/u/tharrison_91509)\
**Post date:** [August 7, 2012, 2:45pm UTC](https://community.f5.com/t/rename-virtual-server/43876/1 "2012-08-07T14:45:13Z")

</div>

I posted this same question here: [https://devcentral.f5.com/tabid/53/…fault.aspx](https://devcentral.f5.com/tabid/53/aft/2163674/Default.aspx)

I do not seem to be able to get the answers I need. What I need to do is use PowerShell to gather all information from an existing Virtual Server and “copy” it to a new Virtual Server under a new name. I need to take a single string “oldname” and change it to a new string “newname”. I am looking for the simplest way to do that. The current method I am looking at is to gather all information from an existing Virtual Server and replicate it to a new one with the new name. What I’d LOVE to be able to do is something like:

$VirtualServer = Get-VirtualServer

$VirtualServer.name = $VirtualServer.name.Replace(“OldCompany”,“NewCompany”)

This would change the virtual server’s name from [www.OldCompany.com](http://www.OldCompany.com)\_443 to [www.NewCompany.com](http://www.NewCompany.com)\_443 and life would be good.

Any help/suggestions is greatly appreciated.

---

<div class="post-metadata">

**Author:** ![hoolio](https://avatars.discourse-cdn.com/v4/letter/h/f6c823/32.png) [@hoolio](https://community.f5.com/u/hoolio)\
**Post date:** [August 8, 2012, 3:32pm UTC](https://community.f5.com/t/rename-virtual-server/43876/2 "2012-08-08T15:32:30Z")

</div>

Hi,

Joe replied to your other post here:

> **[DevCentral](https://community.f5.com/)**
>
> DevCentral is an online technical community where engineers and practitioners collaborate, share knowledge, and solve problems related to F5 technologies and industry trends.

If you have questions on that, you might try replying to that thread to keep everything in the same place.

Aaron
