Jump to content

vascodagama

Members
  • Posts

    4
  • Joined

  • Last visited

Everything posted by vascodagama

  1. Remotely rename a computer using Powershell with Rename-computer –computername “Old-ComputerName” –newname “New-ComputerName” –domaincredential administrator –force –restart This also changes the name in AD keeping all associations Edit: Just remember to replace the angled speech marks (“,”) with standard speech marks ("), as this can sometimes cause scripts to error. Thanks DJ-1701!
  2. $CurrScheme = (powercfg -getactivescheme) $AllSchemes = (powercfg -list) If ($CurrScheme -like '*CustomPowerPlan*') { Exit} IF ($AllSchemes -like '*CustomPowerPlan*') { set-powerplan "CustomPowerPlan" Exit } Else { Powercfg -import C:\Users\User\Documents\CustomPowerPlan.pow start-sleep -milliseconds 500 set-powerplan "CustomPowerPlan" } This simple script imports and applies a custom powerplan. I know this can be done through Group policy but I found this added a large amount of time to pc login. This is my first powershell script, any advice is appreciated
×
×
  • Create New...