How to Change name of the NetConnectionProfile Using Set-NetConnectionProfile in PowerShell
Asked Answered
T

4

6

I Tried Using How to Change name of the NetConnectionProfile Using Set-NetConnectionProfile

$Profile=Get-NetConnectionProfile -InterfaceIndex 35
$Profile.Name = "Network1"            

The Error is

"Name" is a ReadOnly property.
 At line:1 char:1
+ $Profile.Name = "Network1"
+ ~~~~~~~~~~~~~~~~~~~~~~~~
+ CategoryInfo          : NotSpecified: (:) []
+ FullyQualifiedErrorId : ReadOnlyCIMProperty

How to Change the Read only Property of the name?? Help Me

Tricky answered 11/6, 2013 at 18:27 Comment(2)
Can you Explain me how?Tricky
You should avoid putting tags in the question title.Reprobate
A
6

You can do this via direct registry edition.

Under the key HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows NT\CurrentVersion\NetworkList\Profiles

you can see network profiles key (by it's uuid), and can change apropriate network ProfileName value.

Aurie answered 4/10, 2016 at 6:57 Comment(1)
Get-ChildItem -Path "HKLM:\SOFTWARE\Microsoft\Windows NT\CurrentVersion\NetworkList\Profiles\"$UUID = "{01234ABC-...}"$VALUE = "Network1"(Get-ItemProperty -Path "HKLM:\SOFTWARE\Microsoft\Windows NT\CurrentVersion\NetworkList\Profiles\$UUID").ProfileNameSet-ItemProperty -Path "HKLM:\SOFTWARE\Microsoft\Windows NT\CurrentVersion\NetworkList\Profiles\$UUID" -Name ProfileName -Value $VALUEEindhoven
E
1

The Name property is read-only, as you are reading these names.

$Profile=Get-NetConnectionProfile -InterfaceIndex 35

You are trying to Get a particular profile index name. Then declaring it as "Network1"

Learn About Using PowerShell Value Binding by Property Name

http://blogs.technet.com/b/heyscriptingguy/archive/2013/03/25/learn-about-using-powershell-value-binding-by-property-name.aspx

Understanding and Using PowerShell Profiles

http://blogs.technet.com/b/heyscriptingguy/archive/2013/01/04/understanding-and-using-powershell-profiles.aspx

Extradite answered 11/6, 2013 at 18:43 Comment(0)
D
1

@Yvette is right. I don't think you can change this property. This property is from and decided by system.

If it is a domain network profile, it will be your domain name, eg. example.com and domain name is decided by domain controller.

If it is a WiFi network profile, it will be the SSID name of WiFi equipment and SSID is decided by your WiFi equipment.

Downswing answered 11/6, 2013 at 19:34 Comment(0)
P
1

This attribute could be manually changed using secpol. So, I don't think this couldn't be changed. I only have to know HOW. :-)

Pneumococcus answered 31/5, 2020 at 0:30 Comment(0)

© 2022 - 2025 — McMap. All rights reserved.