check what are the GPO’s that applied to a specific machine and Export them on html file

On the machine where you want to check what are the group polices that are applied , run the following command :

c:\ gpresult /h gpresult.html

then go to the c drive and find the html file which has all GPOs’ that are applied to that machine

APIPA comes to static IP Virtual Machine after Rebooting

I was installing security updates which require rebooting the server, after the reboot i wasn’t able to connect to the server remotely, after connecting through the Hyper-V console i found that the machine got APIPA address in spite of having a static IP address.

After searching over the internet i found the solution, i will mention it here and share the source as well.

from the command prompt write:

  • netsh interface ipv4 show inter

Result will be:

1 50 4294967295 connected Loopback Pseudo-Interface 1
11 10 1500 connected Local Area Connection

 

11 keep this number in your mind.

Then run the following command:

  • netsh interface ipv4 set interface 11 dadtransmits=0 store=persistent
  • Then go to services:

Disable  DHCP Client service.

  • Restart the Machine.

Resources:

http://lyngtinh.blogspot.com/2011/12/how-to-disable-autoconfiguration-ipv4.html

Create a file with a specific size

when i was testing the maximum message size should be allowed on Exchange Server , i needed to attach files with specific size, so instead of searching your files for the required size i found this kind command to generate the files with the required size:

you have to use FSUTIL command in the following format:

FSUTIL file createnew < path and name of the file > < size in bytes >

for Example;

To create a file with 20 MB size:

fsutil file createnew d:\TestFile.txt 20000000

 

Resources:

http://windowsitpro.com/systems-management/how-can-i-create-file-certain-size-windows-xp-and-later