Power off the virtual machine in an ESXi host

Ways to power off a virtual machine in an ESXi host using the command line

Source: https://kb.vmware.com/s/article/1014165

Using the ESXi command-line utility vim-cmd to power off the virtual machine

  1. SSH into your ESXi server
  2. Get a list of all registered virtual machines, identified by their VMID, Display Name and path to the .vmx configuration file by running this command: vim-cmd vmsvc/getallvms
    vim-cmd vmsvc/getallvms

  3. Get the current state of a virtual machine by running this command:
    vim-cmd vmsvc/power.getstate VMID

  4. Shutdown the virtual machine using the VMID found in Step 2 and run this command:
    vim-cmd vmsvc/power.shutdown VMID

  5. If the virtual machine fails to shut down, run this command:
    vim-cmd vmsvc/power.off VMID

Continue reading Power off the virtual machine in an ESXi host

SCCM Report – Count All Computers by Model

How to create a MS Configuration manager report that will Count All Computers for each Model

This guide will show you how to create a report in Microsoft System Center Configuration Manager 2012(R2) / Current branch 1702. In this example we will be creating a report which lists all system models and displays a count of each model.

SCCM 2012 (last checked on build 1702) does not have a prebuilt report that will simply return a list of all the distinct manufacturer/model numbers for all the computers in the environment and a count of each type. Continue reading SCCM Report – Count All Computers by Model

How to Ping a List of Computers

Many times It happens that we need to check if a list of computers is active, so how do you ping multiple computers at once?

Use this Powershell script to test connectivity to your list of computers. it will produce two lists of Bad (unresponsive) and Good(Responsive) computers.

You need to change “D:\scripts\list.txt” to the path where your saved your computers list file(.txt).

Also, you can un-comment  #Write-Host $name… to view the list of computers with different colors Continue reading How to Ping a List of Computers

How to run python script on notepad++

How to  Configure Notepad++ to run a python script via python IDLE

If you are learning python and want to use notepad++ as a free as well as simple and easy to use editor, follow these simple steps:

Install python (2.x/3.x)

(this example was made for python 2.7)

First thing: Download the python 2.x/3.x windows installer from http://www.python.org/download/ using the default settings. It should install python in the folder: C:\Python27. You can use a different version of python, just substitute out the version number wherever you see 27. Continue reading How to run python script on notepad++

0x8007052e error in task scheduler

0x8007052e error in task scheduler

Symptom: You get 0x8007052e error when trying to run scheduled task from task scheduler.

There can be several causes for this including authentication problem like bad password.

But I did not easily find documented online records for this error being caused by a group policy, so I think this post might help you – system admins.

Continue reading 0x8007052e error in task scheduler

System Administrators Tricks