Posted by dimarzionist under
Technical | Tags:
Power Sh |
Leave a Comment
If you want to check availablity of some remote host in your powershell script you can use next simple piece of code to do exactly this:$MachineName = “mo-laptop”
$PingStatus = Gwmi Win32_PingStatus -Filter “Address =’$MachineName’” | Select-Object StatusCode
if($PingStatus.StatusCode -eq 0)
{
echo $MachineName
echo “Ping Success”
}
else
{
echo $MachineName
echo “Ping Failed”
}
Posted by dimarzionist under
Technical,
Windows 7 | Tags:
Rearm,
Windows 7 |
1 Comment
If you want continue playing with Windows 7 PDC installation after 30-days trial period ended, you can “rearm” it and use for a bit longer period of time using this simple approach:
- Install Windows 7 without any product activation key.
- After installation is completed, use the Windows 7 for 30 days and wait for the remaining days left to activate Windows counting down to 0, or almost zero.
- When the activation grace period (or evaluation trial period) is almost expired or ended, log on to Windows 7 desktop, and open a Command Prompt window (i.e. type Cmd in Start Search and hit Enter).
- Type any of the following commands into the command prompt, and then hit Enter:sysprep /generalize
slmgr.vbs –rearm
rundll32 slc.dll,SLReArmWindows
slmgr /rearm
- Reboot Windows 7 to enjoy another 30 days of free usage without worrying about activation nor even need to crack Windows 7.
- When the activation grace period countdown timer almost running down to 0 again, repeat the ‘rearm’ trick to enjoy another 30 days of Windows 7 for free. User can run the rearm command for maximum of 3 times.
After this you will require to activate it with proper product key or install other trial version, that probably will be released soon.
from http://www.mydigitallife.info/2008/11/06/how-to-rearm-and-extend-free-usage-activation-grace-period-of-windows-7-to-120-days/
Here is the small quote from Microsoft KB that could help you when you will try to apply file attributes from command line? powershell scripts etc.
To remove the Read-only attribute and to set the System attribute, use the following command:
attrib -r +s drive:\<path>\<foldername>
For example, to remove the Read-only attribute and to set the System attribute for the C:\Test folder, use the following command:
attrib -r +s c:\test
Be aware that some programs may not operate correctly with folders for which the System attribute and the Read-only attribute are set. Therefore, use the following command to remove these attributes:
attrib -r -s c:\test