Who created a VM

I know, this is not a nice solution, but working and simple, when you want to know who created a VM, or any Event information from a VM.
I found lots of other script witch solve this problem, but i have to know one indivudal vm creation day, and information about creator.

PowerCLI C:\WINDOWS\system32> $DATE = Get-Date
PowerCLI C:\WINDOWS\system32> Get-VM -Name VMNAME | Get-VIEvent -Types Info -Start $DATE.AddDays(-700) -Finish $DATE | Export-Csv c:\tmp\events.csv -Encoding utf8

In exported Excel file will store information about who created the VM. You will see like this: “Created virtual machine vmname.domain.loc on 192.168.x.x in clustername” and in this row find the account name who created that.

When you think, the vm is older then 700 days, you can change this value in command.

I hope this short article will help for you!

Disable directory browsing Apache2 Debian8

Change Apache config file. Defult config is here: “/etc/apache2/sites-available/000-default.conf”

You can see similar this, without text in red box:

Apache2_config

Add this text below to the config file:

<Directory “/var/www/html”>
Options Includes FollowSymLinks MultiViews
AllowOverride None
Order allow,deny
Allow from all
</Directory>

Safe file

Restart Apache service

“sudo service apache2 restart”

Done!

You can test when create folders in root directory (in this eximple: /var/www/html) and try browsing this directory any web browser.

Apache2_disable_directory_browsing

You can see like this error message when you did everything well.

I hope this short article will help for You!