Thursday, May 22, 2014

Powershell: Get FQDN of local or remote computer

To get FQDN of local computer:

PS C:\> [System.Net.Dns]::GetHostByName(($env:computerName))

To get FQDN of Remote computer:

PS C:\> [System.Net.Dns]::GetHostByName("notebook01")

Note: 
System.Net.DNS class has a few other useful methods using which you can get FDQN and IP address details.

Refer to http://msdn.microsoft.com/en-us/library/system.net.dns.aspx for more details.

PS C:\> [System.Net.Dns] | Get-Member -Static

Friday, May 2, 2014

How to Use the Cipher Security Tool to Overwrite Deleted Data

To overwrite deleted data on a volume by using Cipher.exe, use the /w switch with the cipher command. Use the following steps:
  1. Quit all programs.
  2. Click Start, click Run, type cmd, and then press ENTER.
  3. Type cipher /w:driveletter:\foldername, and then press ENTER.
To overwrite deleted data on C:\ drive
     C:>Users\user_name\> cipher /w:C:\    and then press ENTER.

To overwrite deleted data on folder
     C:>Users\user_name\> cipher /w:C:\your_folder_name  and then press ENTER.

Note: Specify the drive and the folder that identifies the volume that contains the deleted data that you want to overwrite. Data that is not allocated to files or folders will be overwritten. This permanently removes the data. This can take a long time if you are overwriting a large space. 

Detail URL:  http://support.microsoft.com/kb/315672