Rename-Computer
Renames a computer.
구문
Default (기본값)
Rename-Computer
[-ComputerName <String>]
[-PassThru]
[-DomainCredential <PSCredential>]
[-LocalCredential <PSCredential>]
[-NewName] <String>
[-Force]
[-Restart]
[-WsmanAuthentication <String>]
[-WhatIf]
[-Confirm]
[<CommonParameters>]
Description
This cmdlet is only available on the Windows platform.
The Rename-Computer
cmdlet renames the local computer or a remote computer. It renames one
computer in each command.
This cmdlet was introduced in Windows PowerShell 3.0.
예제
Example 1: Rename the local computer
This command renames the local computer to Server044
and then restarts it to make the change
effective.
Rename-Computer -NewName "Server044" -DomainCredential Domain01\Admin01 -Restart
Example 2: Rename a remote computer
This command renames the Srv01
computer to Server001
. The computer is not restarted.
The DomainCredential parameter specifies the credentials of a user who has permission to rename computers in the ___domain.
The Force parameter suppresses the confirmation prompt.
$renameParams = @{
ComputerName = "Srv01"
NewName = "Server001"
DomainCredential = "Domain01\Admin01"
Force = $true
}
Rename-Computer @renameParams
매개 변수
-ComputerName
Renames the specified remote computer. The default is the local computer.
Type the NetBIOS name, an IP address, or a fully qualified ___domain name of a remote computer.
To specify the local computer, type the computer name, a dot (.
), or localhost
.
This parameter does not rely on PowerShell remoting.
You can use the ComputerName parameter of Rename-Computer
even if your computer is not
configured to run remote commands.
매개 변수 속성
형식: | String |
Default value: | Local Computer |
와일드카드 지원: | False |
DontShow: | False |
매개 변수 집합
(All)
Position: | Named |
필수: | False |
파이프라인의 값: | False |
속성 이름별 파이프라인의 값: | True |
나머지 인수의 값: | False |
-Confirm
Prompts you for confirmation before running the cmdlet.
매개 변수 속성
형식: | SwitchParameter |
Default value: | False |
와일드카드 지원: | False |
DontShow: | False |
별칭: | cf |
매개 변수 집합
(All)
Position: | Named |
필수: | False |
파이프라인의 값: | False |
속성 이름별 파이프라인의 값: | False |
나머지 인수의 값: | False |
-DomainCredential
Specifies a user account that has permission to connect to the ___domain. Explicit credentials are required to rename a computer that is joined to a ___domain.
Type a user name, such as User01
or Domain01\User01
, or enter a PSCredential object, such
as one generated by the Get-Credential
cmdlet.
If you type a user name, this cmdlet prompts you for a password.
To specify a user account that has permission to connect to the computer that is specified by the ComputerName parameter, use the LocalCredential parameter.
매개 변수 속성
형식: | PSCredential |
Default value: | None |
와일드카드 지원: | False |
DontShow: | False |
매개 변수 집합
(All)
Position: | Named |
필수: | False |
파이프라인의 값: | False |
속성 이름별 파이프라인의 값: | False |
나머지 인수의 값: | False |
-Force
Forces the command to run without asking for user confirmation.
매개 변수 속성
형식: | SwitchParameter |
Default value: | None |
와일드카드 지원: | False |
DontShow: | False |
매개 변수 집합
(All)
Position: | Named |
필수: | False |
파이프라인의 값: | False |
속성 이름별 파이프라인의 값: | False |
나머지 인수의 값: | False |
-LocalCredential
Specifies a user account that has permission to connect to the computer specified by the ComputerName parameter. The default is the current user.
Type a user name, such as User01
or Domain01\User01
, or enter a PSCredential object, such as
one generated by the Get-Credential
cmdlet.
If you type a user name, this cmdlet prompts you for a password.
To specify a user account that has permission to connect to the ___domain, use the DomainCredential parameter.
매개 변수 속성
형식: | PSCredential |
Default value: | Current User |
와일드카드 지원: | False |
DontShow: | False |
매개 변수 집합
(All)
Position: | Named |
필수: | False |
파이프라인의 값: | False |
속성 이름별 파이프라인의 값: | False |
나머지 인수의 값: | False |
-NewName
Specifies a new name for the computer. This parameter is required.
Standard names may contain letters (a-z
), (A-Z
), numbers (0-9
), and hyphens (-
), but no
spaces or periods (.
). The name may not consist entirely of digits, and may not be longer than
63 characters
매개 변수 속성
형식: | String |
Default value: | None |
와일드카드 지원: | False |
DontShow: | False |
매개 변수 집합
(All)
Position: | 0 |
필수: | True |
파이프라인의 값: | False |
속성 이름별 파이프라인의 값: | True |
나머지 인수의 값: | False |
-PassThru
Returns the results of the command. Otherwise, this cmdlet does not generate any output.
매개 변수 속성
형식: | SwitchParameter |
Default value: | None |
와일드카드 지원: | False |
DontShow: | False |
매개 변수 집합
(All)
Position: | Named |
필수: | False |
파이프라인의 값: | False |
속성 이름별 파이프라인의 값: | False |
나머지 인수의 값: | False |
-Restart
Indicates that this cmdlet restarts the computer that was renamed. A restart is often required to make the change effective.
매개 변수 속성
형식: | SwitchParameter |
Default value: | None |
와일드카드 지원: | False |
DontShow: | False |
매개 변수 집합
(All)
Position: | Named |
필수: | False |
파이프라인의 값: | False |
속성 이름별 파이프라인의 값: | False |
나머지 인수의 값: | False |
-WhatIf
Shows what would happen if the cmdlet runs. The cmdlet is not run.
매개 변수 속성
형식: | SwitchParameter |
Default value: | False |
와일드카드 지원: | False |
DontShow: | False |
별칭: | wi |
매개 변수 집합
(All)
Position: | Named |
필수: | False |
파이프라인의 값: | False |
속성 이름별 파이프라인의 값: | False |
나머지 인수의 값: | False |
-WsmanAuthentication
Specifies the mechanism that is used to authenticate the user credentials when this cmdlet uses the WSMan protocol. The acceptable values for this parameter are:
- Basic
- CredSSP
- Default
- Digest
- Kerberos
- Negotiate
The default value is Default.
For more information about the values of this parameter, see AuthenticationMechanism Enumeration.
Warning
Credential Security Service Provider (CredSSP) authentication, in which the user credentials are passed to a remote computer to be authenticated, is designed for commands that require authentication on more than one resource, such as accessing a remote network share. This mechanism increases the security risk of the remote operation. If the remote computer is compromised, the credentials that are passed to it can be used to control > the network session.
This parameter was introduced in Windows PowerShell 3.0.
매개 변수 속성
형식: | String |
Default value: | None |
허용되는 값: | Default, Basic, Negotiate, CredSSP, Digest, Kerberos |
와일드카드 지원: | False |
DontShow: | False |
매개 변수 집합
(All)
Position: | Named |
필수: | False |
파이프라인의 값: | False |
속성 이름별 파이프라인의 값: | False |
나머지 인수의 값: | False |
CommonParameters
This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutBuffer, -OutVariable, -PipelineVariable, -ProgressAction, -Verbose, -WarningAction, and -WarningVariable. For more information, see about_CommonParameters.
입력
None
This cmdlet has no parameters that take input by value. However, you can pipe the values of the ComputerName and NewName properties of objects to this cmdlet.
출력
None
By default, this cmdlet doesn't return any output.
RenameComputerChangeInfo
When you use the PassThru parameter, this cmdlet returns a RenameComputerChangeInfo object.
참고
This cmdlet is only available on Windows platforms.