Showing posts with label scripting. Show all posts
Showing posts with label scripting. Show all posts

Thursday, April 17, 2014

Getting a list of vm's with OS'es

I wanted to do a Get-VM|select name, GuestOSFullname, but that doesn't work. So some googling gave me this little gem on the vmware forum:

New-VIProperty -Name GuestFullName -ObjectType VirtualMachine -ValueFromExtensionProperty 'Guest.GuestFullName' -Force

Now I can do a Get-VM | Select Name, GuestFullName and I get an overview of which machines have which OS.

I'm sure there are other ways of getting this too, but this was what I was looking for.

P.S., if I do Get-VM | Select Name,Guest , I do get the OS, but it is prepended with the hostname.

Tuesday, November 22, 2011

Disable Symantec AV via scripting

A small script to quickly disable Symantec Antivirus 11 (Symantec Endpoint Protection) for those moments that it needs to be disabled quickly:

Open up an administrative commandprompt and type the following commands:

sc config "Symantec AntiVirus" start= disabled
sc config ccEvtMgr start= disabled
sc config SmcService start= disabled

net stop "Symantec AntiVirus"
net stop ccEvtMgr

taskkill /IM smc.exe /F

Symantec Antivirus is now completely disabled