Tag: Powershell
Categories: Powershell, SCCM
Create HTML table Powershell
Post date:
Author: admin
Tags: HTML, Powershell, Table
In this example you get a status report on the computer.
Categories: Powershell, SCVMM
SCVMM: Force remove missing VM
Post date:
Author: admin
Tags: Powershell, SCVMM, VM
Make sure you get the correct VM Get-VM -Name “VM Name” | Ft Name When you know that the first query give you the correct VM, and only that VM Get- VM -Name “VM Name” | Remove-VM -Force
Categories: Powershell
Powershell: Rename remote computer with WMI
Post date:
Author: admin
Tags: Powershell
To rename a computer when Rename-Computer is not available (pre Powershell 4.0) Get-WmiObject Win32_ComputerSystem -ComputerName OLDNAME -Authentication 6 | ForEach-Object {$_.Rename(“NEWNAME”,”PASSWORD”,”USERNAME”)} You can also mask the password $credential = Get-Credential Get-WmiObject Win32_ComputerSystem -ComputerName OLDNAME -Authentication 6 | ForEach-Object {$_.Rename(“NEWNAME”,$credential.GetNetworkCredential().Password,$credential.Username)}