My notebook



Export your IIS websites list to a xls (Excel)

run cmd as admin’

> %windir%\system32\inetsrv\appcmd list site > c:\sites.xls

Vmware Windows 2012 R2 template configuration–Recommended


  • Floppy Drive Removed
  • Memory 4GB
  • Hard Disk 40 GB – Keeping it low is good as you cannot reduce thin provisioned disk size.

Make sure Hot Add is enabled

  • Enable Memory Hot Add for this Virtual Machine
  • Enable CPU Hot Add only for this Virtual Machine


  • Check and Upgrade Tools during Power Cycling


  • Check Enable Logging


Get to Boot Screen to do some configurations –


  • Boot-Time Diagnostic Screen to Enabled


Change Boot Order to  –

  • Hard Drive
  • Removable Devices
  • CD-ROM Drive
  • Network boot

Use + to Toggle or Shift ` +


Advanced –> I/O Device Configuration Serial Ports/Parallel Ports/Floppy Disabled.


  • Install VMware Tools


Disabled IPv6


Allow Remote Desktop –


  • Set Time to Display List of Operating Systems to 5 Seconds
  • Set Time to Display recovery Options when Needed to 5 Seconds


Change Machine Name –


Make sure Windows is up to date –

  • As .NET 4.6.1 is not supported for Some Applications like Exchange. Not Installing it at this point of time (Optional).


Open PowerShell Run as Administrator and Cleanup C:\Windows\WinSxS folder which contains all the Updates which is almost 8GB

Dism.exe /online /Cleanup-Image /StartComponentCleanup /ResetBase

This is a great command added with Windows 8.1 and Windows Server 2012 R2.  Essentially, it’s the mother of all commands. It cleanups and removes all the old superseded stuff from every component in the component store.


Change DVD ROM Drive Letter to Z: in Disk Management –


Control Panel – Notification Area Icons – Check Always Show All Icons and Notifications on the Taskbar


Power Options Set to High Performance


  • Proper Time Zone Updated in Server Manager
  • IE Enhance Security Configuration is set of OFF for Administrators only.


Start Run – Lusrmgr.msc – Local Administrator Account – Password Never Expires


Check – File Name Extensions

Windows Explorer – View –


Clear All Event Logs

Get-EventLog -List | foreach{Clear-EventLog -LogName $_.log}


  • Shutdown Windows 2012 R2 Template server

Windows Server 2012 Sysprep – %windir%\system32\sysprep

  • Convert to Template


Microsoft Recommendation –

  • Do not Disable User Access Control (UAC)
  • Do not Disable Windows Firewall


Deploy Virtual Machine From this Template –


Customization Specifications Manager to Join Domain Automatically –



Enter Local Administrator Password –


Network Settings



Enter Domain Information –


  • Check Generate New Security ID (SID)


  • Customize using an Existing customization Specification


Deploy Virtual Machine using Template –



Machine Joined Automatically –


Using PowerCLI – Import Multiple Virtual Machines using CSV

Original post.

Install LAMP Server (Apache, MySQL, PHP) On RHEL, CentOS, Scientific Linux 6.5/6.4

LAMP is a combination of operating system and open-source software stack. The acronym LAMP is derived from first letters of Linux, Apache HTTP Server, MySQL database, and PHP/Perl/Python.

In this tutorial let us see how to setup LAMP server on RHEL/CentOS/Scientific Linux 6.x. Here x stands for version such as 6.1, 6.2, 6.3, 6.4, 6.5 etc.

My testbox hostname and IP address are server.unixmen.local and, respectively.

Install Apache

Apache is an open-source multi-platform web server. It provides a full range of web server features including CGI, SSL and virtual domains.

To install Apache, enter the following command from your terminal:

# yum install httpd -y

Start the Apache service and let it to start automatically on every reboot:

# service httpd start
# chkconfig httpd on

Allow Apache server default port 80 through your firewall/router if you want to connect from remote systems. To do that, edit file /etc/sysconfig/iptables,

# vi /etc/sysconfig/iptables

Add the following lines.

-A INPUT -m state --state NEW -m tcp -p tcp --dport 80 -j ACCEP

Restart iptables:

# service iptables restart

Test Apache:

Open your web browser and navigate to http://localhost/ or http://server-ip-address/.

Apache HTTP Server Test Page powered by CentOS - Mozilla Firefox_001

Install MySQL

MySQL is an enterprise class, open source, world’s second most used database. MySQL is a popular choice of database for use in web applications, and is a central component of the widely used LAMP open source web application software stack.

To install MySQL, enter the following command:

# yum install mysql mysql-server -y

Start the MySQL service and make to start automatically on every reboot.

# service mysqld start
# chkconfig mysqld on

Setup MySQL root password

By default, mysql root user doesn’t has password. To secure mysql, we have to setup mysql root user password.

# mysql_secure_installation
In order to log into MySQL to secure it, we'll need the current
password for the root user.  If you've just installed MySQL, and
you haven't set the root password yet, the password will be blank,
so you should just press enter here.

Enter current password for root (enter for none):     ## Press Enter ## 
OK, successfully used password, moving on...
Setting the root password ensures that nobody can log into the MySQL
root user without the proper authorisation.

Set root password? [Y/n]     ## Press Enter ##
New password:                ## Enter new password ##
Re-enter new password:       ## Re-enter new password ##
Password updated successfully!
Reloading privilege tables..
 ... Success!

By default, a MySQL installation has an anonymous user, allowing anyone
to log into MySQL without having to have a user account created for
them.  This is intended only for testing, and to make the installation
go a bit smoother.  You should remove them before moving into a
production environment.

Remove anonymous users? [Y/n]     ## Press Enter ##
 ... Success!

Normally, root should only be allowed to connect from 'localhost'.  This
ensures that someone cannot guess at the root password from the network.

Disallow root login remotely? [Y/n]     ## Press Enter ## 
... Success!
By default, MySQL comes with a database named 'test' that anyone can
access.  This is also intended only for testing, and should be removed
before moving into a production environment.

Remove test database and access to it? [Y/n]     ## Press Enter ##
 - Dropping test database...
 ... Success!
 - Removing privileges on test database...
 ... Success!
Reloading the privilege tables will ensure that all changes made so far
will take effect immediately.

Reload privilege tables now? [Y/n]     ## Press Enter ##
 ... Success!

Cleaning up...

All done!  If you've completed all of the above steps, your MySQL
installation should now be secure.

Thanks for using MySQL!

Install PHP

PHP (recursive acronym for PHP: Hypertext Preprocessor) is a widely used open-source general purpose scripting language that is especially suited for web development and can be embedded into HTML.

Install PHP with following command:

# yum install php -y

Test PHP

Create a sample “testphp.php” file in Apache document root folder and append the lines as shown below:

# vi /var/www/html/testphp.php

Add the following lines.

Restart httpd service:

# service httpd restart

Navigate to http://server-ip-address/testphp.php. It will display all the details about php such as version, build date and commands etc.

If you wanna to get MySQL support in your PHP, you should install “php-mysql” package. If you want to install all php modules just you use the command “yum install php*”

[root@server ~]# yum install php-mysql -y

Now open the phptest.php file in your browser using http://ip-address/testphp.php or http://domain-name/testphp.php. Scroll down and you will see the mysql module will be presented there.

phpinfo() - Mozilla Firefox_002Install phpMyAdmin

phpMyAdmin is a free open source web interface tool, used to manage your MySQL databases. By default phpMyAdmin is not found in CentOS official repositories. So let us install it using EPEL repository.

To install EPEL repository, follow the below link:

Install EPEL Repository On RHEL/CentOS/Scientific Linux 6

Now install phpMyAdmin

# yum install phpmyadmin -y

Configure phpMyAdmin

Edit the phpmyadmin.conf file.

# vi /etc/httpd/conf.d/phpMyAdmin.conf

Find and comment the whole /<Directory> section as shown below:

Alias /phpMyAdmin /usr/share/phpMyAdmin
Alias /phpmyadmin /usr/share/phpMyAdmin

#<Directory /usr/share/phpMyAdmin/>
#   <IfModule mod_authz_core.c>
#     # Apache 2.4
#     Require local
#   </IfModule>
#   <IfModule !mod_authz_core.c>
#     # Apache 2.2
#     Order Deny,Allow
#     Deny from All
#     Allow from
#     Allow from ::1
#   </IfModule>

Open “” file and change from “cookie” to “http” to change the authentication in phpMyAdmin:

# cp /usr/share/phpMyAdmin/ /usr/share/phpMyAdmin/ 
# vi /usr/share/phpMyAdmin/

Change cookie to http.

/* Authentication type */
$cfg['Servers'][$i]['auth_type'] = 'http';

Restart the Apache service:

# service httpd restart

Now you can access the phpmyadmin console by navigating to http://server-ip-address/phpmyadmin/ from your browser.

Enter your MySQL username and password which you have given in previous steps. In my case its “root” and “centos”.

phpMyAdmin - Mozilla Firefox_003Now you will be redirected to the phpmyadmin as shown below. - localhost | phpMyAdmin 4.1.2 - Mozilla Firefox_004

Now you will able to manage your MariaDB databases from phpMyAdmin web interface.

That’s it. Your LAMP server is up and ready to use.

Original post – link

Backup And Restore Credentials In Windows 7,8 / 10

Part 1:- Creating Backup of Credentials:-


Step 1:- Press  + R and type
explorer shell:::{1206F5F1-0569-412C-8FEC-3204630DFB70} in the Run dialog box, hit Enter key to open Credential Manager snap-in.


Step 2 :- Now you can there two option available. One is Web Credentials and second is Windows Credentials. Select one which you want tack back up. For example, if you want tack back for Windows credentials then switched to Windows Credentials tab. Then click Back up Credentials link.

Step 3:- Now the backup wizard has started and in the below shown window, click Browse button to choose a backup location.

Step 4:- After Finish file saving process next, you’ll be asked to press CTRL+ALT+DELETE keys simultaneously to continue, hence do the needful.

Step 5:- When you click on Next button then next window asking you for password. Here i am suggest you password should be strong. Your all username and password are save in this file so be care for this file. Click Next…


Step 6:-Finally, you’ll get the backup was successful message and you’re done. Click Finish to close the wizard.


In this way you can backup credentials. Now let’s see how to restore credentials from this same backup.
Part 2:- How to restore credentials from this same backup
Step 1:- Open Credential Manager and switch to Windows/Web Credentials tabs, depending upon for which side you want to restore credentials. Click Restore Credentials link there.


Step 2:- Next, open the backup file in following window. The file must be having .crd extension


Step 3:- Now you’ll be asked to press CTRL+ALT+DELETE keys to continue. Type in the password of this backup file. Click Next.


Step 4:- Once you clicked next in above shown window, your credentials are restored.  

Hope you find the guide useful!



Windows – move \ copy files

Move all files older than x days

robocopy "source" "destination" /move /minage:10

Copy files was created from date:

xcopy "source\*.txt" "destination" /D:01-01-2015

How to Change your Network Profile in Server 2012 and windows 8

Open the PowerShell

Get-NetConnectionProfile | Set-NetConnectionProfile -NetworkCategory Private


How to remove the built-in Windows 10 applications

Как удалить встроенные в Windows 10 приложения.

3D Builder

Get-AppxPackage *3d* | Remove-AppxPackage


Get-AppxPackage *camera* | Remove-AppxPackage

Mail и Calendar

Get-AppxPackage *communi* | Remove-AppxPackage

Money, Sports, News

Get-AppxPackage *bing* | Remove-AppxPackage

Groove Music

Get-AppxPackage *zune* | Remove-AppxPackage

Phone Companion

Get-AppxPackage *phone* | Remove-AppxPackage


Get-AppxPackage *photo* | Remove-AppxPackage

Solitaire Collection

Get-AppxPackage *solit* | Remove-AppxPackage

Voice Recorder

Get-AppxPackage *soundrec* | Remove-AppxPackage


Get-AppxPackage *xbox* | Remove-AppxPackage


Get-AppxPackage *maps* | Remove-AppxPackage


Get-AppxPackage *alarms* | Remove-AppxPackage

Восстановить какую-то из удалённых программ можно с помощью магазина приложений Windows Store. В случае возникновения любых проблем запустите опять PowerShell и введите команду, возвращающую на место весь комплект предустановленных утилит.

Get-AppXPackage | Foreach {Add-AppxPackage -DisableDevelopmentMode -Register "$($_.InstallLocation)\AppXManifest.xml"}


Добавление второго IP-адреса (алиаса) к сетевой карте в Windows из командной строки (cmd)

Для добавления адреса к сетевой карте в GUI необходимо зайти в свойства сетевой карты, свойства протокола TCP/IPv4 и там – в Дополнительно и Добавить:

Для скриптования или удаленного доступа может пригодиться команда для добавления нетворк алиасов в cmd:

netsh -c Interface ip add address name=”Local Area Connection” addr= mask=

А также для их удаления:

netsh -c Interface ip delete address name=”Local Area Connection” addr=

name – это название сетевого адаптера.
Команда требует административных привелегий, конечно же.

Continue reading “Добавление второго IP-адреса (алиаса) к сетевой карте в Windows из командной строки (cmd)”

Activation Error: Code 0x8007232b

Click All Programs, click Accessories, and then right-click Command Prompt.

  1. Click Run as administrator.
  2. Enter: slmgr -ipk xxxxx-xxxxx-xxxxx-xxxxx-xxxxx

Create a free website or blog at

Up ↑