< Back
Rename-d00mRecycleBin
Post
NAME Rename-d00mRecycleBin
SYNOPSIS
Rename the Recycle Bin!
SYNTAX
Rename-d00mRecycleBin [-ComputerName] <String[]> [-NewName] <String> [[-Credential] <PSCredential>]
[<CommonParameters>]
DESCRIPTION
Change a registry key to rename the Recycle Bin and then
restart the explorer process so that the change is reflected
PARAMETERS
-ComputerName <String[]>
The names of computers to change the name of the Recycle Bin
Required? true
Position? 1
Default value
Accept pipeline input? true (ByValue, ByPropertyName)
Accept wildcard characters? false
-NewName <String>
The new name of the Recycle Bin
Required? true
Position? 2
Default value
Accept pipeline input? false
Accept wildcard characters? false
-Credential <PSCredential>
Administrative credentials for the computers
Required? false
Position? 3
Default value
Accept pipeline input? false
Accept wildcard characters? false
<CommonParameters>
This cmdlet supports the common parameters: Verbose, Debug,
ErrorAction, ErrorVariable, WarningAction, WarningVariable,
OutBuffer, PipelineVariable, and OutVariable. For more information, see
about_CommonParameters (https:/go.microsoft.com/fwlink/?LinkID=113216).
INPUTS
OUTPUTS
-------------------------- EXAMPLE 1 --------------------------
PS C:\\>Rename-d00mRecycleBin -ComputerName localhost -NewName 'Recycle Bin'
This example will change a registry key to rename the Recycle Bin to
the new name specified, Recycle Bin (maybe to change the name back from
changing it earlier), for the specified computer name, the local host, and
then restart the explorer process so that the change is reflected using
the default credentials
-------------------------- EXAMPLE 2 --------------------------
PS C:\\>'Computer1', 'Computer2' | Rename-d00mRecycleBin -NewName 'Garbage'
This example will change a registry key to rename the Recycle Bin to
the new name specified, Garbage, for the piped in computer names, Computer1
and Computer2, and then restart the explorer process so that the change
is reflected using the default credentials
-------------------------- EXAMPLE 3 --------------------------
PS C:\\>$cred = Get-Credential
(Get-AdComputer -Filter {(enabled -eq 'true') -and (operatingsystem -like '*Windows*')}).Name |
Rename-d00mRecycleBin -NewName 'Your hopes and dreams' -Credential $cred
This example will change a registry key to rename the Recycle Bin to
the new name specified, Your Hopes and Dreams, for all the computer names
piped in from the Get-AdComputer cmdlet, and then restart the explorer process
so that the changes are reflected using the specified credentials. Kind of a
rude thing to do...
RELATED LINKS
SYNOPSIS
Rename the Recycle Bin!
SYNTAX
Rename-d00mRecycleBin [-ComputerName] <String[]> [-NewName] <String> [[-Credential] <PSCredential>]
[<CommonParameters>]
DESCRIPTION
Change a registry key to rename the Recycle Bin and then
restart the explorer process so that the change is reflected
PARAMETERS
-ComputerName <String[]>
The names of computers to change the name of the Recycle Bin
Required? true
Position? 1
Default value
Accept pipeline input? true (ByValue, ByPropertyName)
Accept wildcard characters? false
-NewName <String>
The new name of the Recycle Bin
Required? true
Position? 2
Default value
Accept pipeline input? false
Accept wildcard characters? false
-Credential <PSCredential>
Administrative credentials for the computers
Required? false
Position? 3
Default value
Accept pipeline input? false
Accept wildcard characters? false
<CommonParameters>
This cmdlet supports the common parameters: Verbose, Debug,
ErrorAction, ErrorVariable, WarningAction, WarningVariable,
OutBuffer, PipelineVariable, and OutVariable. For more information, see
about_CommonParameters (https:/go.microsoft.com/fwlink/?LinkID=113216).
INPUTS
OUTPUTS
-------------------------- EXAMPLE 1 --------------------------
PS C:\\>Rename-d00mRecycleBin -ComputerName localhost -NewName 'Recycle Bin'
This example will change a registry key to rename the Recycle Bin to
the new name specified, Recycle Bin (maybe to change the name back from
changing it earlier), for the specified computer name, the local host, and
then restart the explorer process so that the change is reflected using
the default credentials
-------------------------- EXAMPLE 2 --------------------------
PS C:\\>'Computer1', 'Computer2' | Rename-d00mRecycleBin -NewName 'Garbage'
This example will change a registry key to rename the Recycle Bin to
the new name specified, Garbage, for the piped in computer names, Computer1
and Computer2, and then restart the explorer process so that the change
is reflected using the default credentials
-------------------------- EXAMPLE 3 --------------------------
PS C:\\>$cred = Get-Credential
(Get-AdComputer -Filter {(enabled -eq 'true') -and (operatingsystem -like '*Windows*')}).Name |
Rename-d00mRecycleBin -NewName 'Your hopes and dreams' -Credential $cred
This example will change a registry key to rename the Recycle Bin to
the new name specified, Your Hopes and Dreams, for all the computer names
piped in from the Get-AdComputer cmdlet, and then restart the explorer process
so that the changes are reflected using the specified credentials. Kind of a
rude thing to do...
RELATED LINKS