Powershell Computer Rename (Prompt)
Log In or Register to download the BES file, and more.

0 Votes

Description

<enter a description of the task here>

Property Details

ID26604
StatusBeta - Preliminary testing ready for more
TitlePowershell Computer Rename (Prompt)
DomainBESC
SourceBrad Sexton
Source Release Date12/4/2018 12:00:00 AM
Keywordsrename computer, powershell, windows
Is TaskTrue
Added by on 2/12/2019 9:51:50 AM
Last Modified by on 2/12/2019 9:51:50 AM
Counters 57 Views / 0 Downloads
User Rating 1 star 2 star 3 star 4 star 5 star * Average over 0 ratings. ** Log In or Register to add your rating.

Relevance

Used in 357 fixlets   * Results in a true/false
Show indented relevance
(if( name of operating system starts with "Win" ) then platform id of operating system != 3 else false) AND (if exists property "in proxy agent context" then ( not in proxy agent context ) else true )

Actions

Action 1 (default)

Action Link Click here to deploy this action.
Script Type BigFix Action Script
// Disable wow64 redirection on x64 OSes
action parameter query "PC-Name" with description "Please enter the new PC name"

action uses wow64 redirection {not x64 of operating system}

delete __createfile

// CREATEFILE
createfile until END_OF_FILE

$computerName = Get-WmiObject Win32_ComputerSystem
$computername.Rename("{parameter "PC-Name" of action}")


get-help | Out-File "{(pathname of folder "__BESData\__Global\Logs" of parent folder of client)}\config_powershell.log"


END_OF_FILE

delete powershell.ps1
move __createfile powershell.ps1

waithidden { pathname of file ((it as string) of value "Path" of key "HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\PowerShell\1\ShellIds\Microsoft.PowerShell" of native registry) } -ExecutionPolicy unrestricted -File powershell.ps1
Success Criteria

This action will be considered successful when the applicability relevance evaluates to false.


Sharing

Social Media:
Share this page on Yammer

Comments

Log In or Register to leave comments!