Thursday 23 January 2014

Restore Factory Untuk Makmal Komputer

No comments:
Recovery Manual Clonezilla
Assalamualaikom w.b.t

Alhamdulillah saya hampir menyiapkan kesemua komputer makmal dengan sistem Kembali ke Imej kilang (Factory Restore). Sistem ini sangat mudah dan percuma.

Bagaimana sistem ini berfungsi?

Asasnya ialah penggunaan Grub4dos sebagai loader utama sebelum ke loader windows di dalam mode booting. Daripada Grub4dos ada pilihan menu untuk membuat backup dan restore menggunakan  Clonezilla live.

Berikut ialah proses chain loader dari grub4dos ke loader windows dan clonezilla (linux kernal)

BIOS --> HD --> MBR ---> PBR ---> Grub4dos ---> Clonezilla Live (restore dan backup)

BIOS --> HD --> MBR ---> PBR ---> Grub4dos ---> NTLDR (Windows Xp)

BIOS --> HD --> MBR ---> PBR ---> Grub4dos ---> BootMgr (Win Server 2008 R2)

Contoh penggunaan Grub4Dos
Dengan kaedah ini, windows akan dapat di kembalikan ke keadaan asal sepertimana selepas kita membuat salinan imej (image backup) melalui pilihan Auto Restore ketika di penampilan menu grub4dos.

InsyaAllah sekiranya saya ada kelapangan masa saya akan sertakan tutorial yang lebih lengkap termasuk kod-kod yang digunakan di menu.lst.

Wallahuallam...

Monday 20 January 2014

[CMD] Safe to Rearm Script Windows 7, Server 2008 R2

No comments:
Rearm to extend up to 50 days more
Assalamualaikom w.b.t

After prepared about 25 desktop with windows server 2008 R2, i need a simple batch command that can exteding the trial version without wasting available rearm count. In windows 7 and windows server 2008 r2, we can rearm or extend the trial days five times with 10 days each by execute this command in command prompt:

slmgr.vbs /rearm

However if we execute multiple times, the remaining rearm count will decreased and overwrites and lastly will left to zero. This will wasting our remaining rearm availability that should be execute after each 10 days trial for five times.

Execte slmgr.vbs /dlv to view remainign time and rearm count


Then, i got an idea to create simple basic tool using batch command that can rearm without worrying about its still under trial days. This script will rearm if our trial lest than 8 hours to become expired.

Here you go:

@echo off
cls
mode con: cols=65 lines=15
:START
echo. ---- Safe Autorearm build to avoid wasting remaining rearm ----
echo.         Created by myskali.blogspot.com
echo.               Associate Technical Services
echo.               last updated 14 January 2014
echo.
echo. Finding available minutes...
echo.

for /f "tokens=3" %%a in ('cscript.exe %windir%\system32\slmgr.vbs /dlv ^| FINDSTR /i /c:"Notification Reason"') do goto REARM

for /f "tokens=3" %%a in ('cscript.exe %windir%\system32\slmgr.vbs /dlv ^| FINDSTR /i /c:"Time Remaining"') do set dtime=%%a


echo.
echo. ++   Minutes remaining is %dtime%   ++


if %dtime% GEQ 500 goto BANYAK
goto REARM



:BANYAK
echo.
echo.
echo. Your current rearm still have much time to be used!
echo.
echo.
goto EXIT

:REARM
echo.
echo.
echo+
cscript.exe %windir%\system32\slmgr.vbs /rearm
IF ERRORLEVEL 1 pause & goto START
shutdown /r /t 30 /C "Windows will restart in 30 seconds..."
echo+
goto EXIT

:EXIT
pause
exit


Copy above command and save as saferearm.bat and ready to use.


Sunday 12 January 2014

[VBS] Menggubah Nama Komputer Dengan Serial Number Dari Bios

No comments:
Assalamualaikom w.b.t

Bulan Januari 2014 merupakan bulan yang sibuk kerana saya ditugaskan untuk mempersiapkan komputer-komputer untuk digunakan di makmal dan diserahkan kepada staf-staf.

Antara tugasannya ialah menukar nama komputer dengan nombor siri DELL. Nombor siri DELL biasanya dikenali sebagai Servis Tag. Servis Tag ini terdiri daripada 7 aksara dan dalam bentuk asas 36 (0-9, A-Z). Produk OEM jenama DELL juga memiliki Ekspress Code yang sebenarnya merupakan penukaran kepada asas 10 (0-9) dari Service Tag.

Untuk memudahkan kerja-kerja ketika proses membuat installasi perision-perisian wajib saya telah menyiapkan skrip vbs untuk menukar nama komputer lama ke nama komputer berdasarkan Service Tag. Secara khusunya saya mahukan apabila script ini dijalankan ia akan menukar nama komputer dengan format seperti ini:

SCALE_B1YSUJS (yg warna merah ada nombor siri komputer atau Dell Service Tag)

Berikut skripnya yg perlu disimpan sebagai fail dengan extension .vbs:

dim Bios, BiosSerial

'get serial number
for each Bios in GetObject("winmgmts:").InstancesOf ("win32_bios")
BiosSerial = Bios.SerialNumber
exit for
next

strComputer = "."
Set objWMIService = GetObject("winmgmts:" _
& "{impersonationLevel=impersonate}!\\" & strComputer & "\root\cimv2")

Set colComputers = objWMIService.ExecQuery _
("Select * from Win32_ComputerSystem")

For Each objComputer in colComputers
err = objComputer.Rename("SCALE_" + BiosSerial)
Next

'messagebox
If err = 0 Then
msgbox "Computername changed to " + BiosSerial + "...", yes
Else
MsgBox "Error code: " & err
End If

Thursday 9 January 2014

Reset Password Administrator Windows Server 2008 R2

No comments:
Assalamualaikom w.b.t

This week i need to restore our labs with Windows Server 2008 R2 for testing. We using trial version that can be rearm (extend 10 days trial period) for another 2 times. Then we trying to clone and restore to another desktop.

The challenge is after restoration/deploy  i lost and cant remember what the password to login to the server. After trying using several my favorite password list and several password re-setter and bypasses tools still not working

Alhamdulillah, its lucky to me and its lucky to you all coz i will share to you how to clearing and resetting an Administrator account on Windows Server 2008 R2 Enterprise (trial period) just using windows installer disk.

Here how to:-

1. Boot from the Micrsoft Windows Server 2008 DVD
2. From the Install Windows menu, click “Next”.
3. Select “Repair your computer”




4. In the System Recovery Options, select the Operating System instance that you wish to repair and click “Next”.



5. Select “Command Prompt”. At the command prompt, run the following commands:



c:
cd windows\system32
move Utilman.exe Utilman.exe.bak
copy cmd.exe Utilman.exe


6. Reboot the server allowing Windows to load as normal

7. At the logon screen, press Windows Key + U or click Ease of access icon.
Ease of Access icon





8. As the command prompt appeared, enter the following command:

net user administrator *

Once you press enter you will asked to set a new password and then confirm it, when entering your new password don’t worry if you can’t see them as you type, they are invisible, they are however being remembered (case sensitive).

My problem is when to change the "Administrator" password it returns the following error:

System error 1359 has occurred.

An internal error occurred.


The same error appeared if we try using this command:

net user administrator /active:yes

So to solve this problem we need to use another alternative solution which to create a new user with Administrator privilege.

Type command below:

net user admin /add
net localgroup Administrators admin /add


Above command will create new user "admin" with Administrator role. Now you need to click switch user and use newly created user to login.

Once you're logged in with "admin" username, just change "Administrator" password and switch back to "Administrator" to delete temporary "admin" account.

Oh ya and don’t forget to delete Utilman.exe and then rename Utilman.exe.bak back to plain old Utilman.exe using Windows Installer DVD the same way we done previously or using take ownership:

right-click properties, and gain ownership of the file.
properties-> security-> advanced-> owner.
After that set permissions to read and write the file if you need to.

Wallahua'lam..

**Update**
This method should work with Windows 7 and Windows Server 2012