All PowerShell Code

28 hits, 3 pages | Prev | Next | Advanced Search

Title Posted On Description
Resolving IP to Hostname with PowerShell 2016-01-15

Getting the hostname from an IP address (or vice versa) is no great magic, and can be done easily with PowerShell, by simply leveraging .Net to do the work.

Start SCOM Maint Mode with PowerShell 2017-12-13
Turns on Maintenance Mode for a specific computer monitored by SCOM (System Center Operations Manager).  Ensure that the OperationsManager module is available on the computer from which this script is executed.
Stop service and wait 2017-12-10

Very simple script that stops a service and waits for it to stop before rebooting. This script can be edited so it runs on every reboot or can be run manually to reboot.

Stop-ProcessRemote 2017-12-10
In an interesting design choice, Get-Process lets you work with processes on remote machines, but Stop-Process does not. This cmdlet uses WMI to stop a process on a remote machine.
Use PowerShell to quickly deploy a VM 2017-11-10

Using virtual machines to test things has become almost a second nature exercise for some folks. Here's a method to deploy a duplicate of a Hyper-V virtual machine in less than ten seconds with PowerShell.

Use PowerShell to Remove a Stubborn VM 2014-08-02

During a recent cleanup effort in the System Center Virtual Machine Manager console, I found a powered off guest machine.  The status showed the VM as having an "Unsupported Cluster Configuration State".

Use WMI to create a VM with PowerShell 2017-12-17
A function to create a new Hyper-V virtual machine using WMI, with the ability to create the VM on a remote host. Also allows for specifiying the target location.
User PowerShell to send a pop-up 2017-12-13

Nothing magical here, just a little something to help get the attention of whoever is at the keyboard on a remote machine. This funtion will allow you to pop up a message on a LAN-connected computer.

28 hits, 3 pages | Prev | Next | Advanced Search


Code Links