Sunday, November 15, 2015

Install windows from a network location


First create a win pe image and either set up a pxe boot server or just boot from dvd or usb.

You will end up with a cmd prompt :
X:\windows\system32\>wpeinit

Map the location where you have the windows image :
net use n: \\networkpc\sharename passwords /user:username
cd n:\windows7
setup.exe

If you run into an error "autorun.dll" could not be loaded or is corrupt setup can not continue error code (0xC1). This means your version of WinPE is mismatched with your Windows ISO. Type ver at the WinPE prompt.

|   ver    | Win PE Version | Matching Windows ISO | 
----------------------------------------------------
| 6.0.6*** |     2.*        |    Windows Vista     |
| 6.1.7600 |     3.0        |      Windows 7       |
| 6.1.7601 |     3.1        |    Windows 7 SP1     |
| 6.2.9200 |     4.0        |      Windows 8       |
| 6.3.9600 |     5.0        |     Windows 8.1      |

Saturday, November 14, 2015

Windows cmd commands

  1. Remove folder with all content :
    rd /s /q       - faster and better then explorer for erasing large amount of files
  2. Change file/folder attributes
    attrib +shr -shr filename/folders - system file
    h - hidden file
    r - read only file
  3. View all files/folders including hidden/system etc
    dir /a
    dir /a:h   -
    display only hidden files
  4. View windows install date :
    systeminfo | find "Install Date"
  5. Force date and time sync
    net start w32time
    w32tm /resync /force
  6. Set date or time :
    date 04-15-2015


Wednesday, November 11, 2015

Open CMD while installing windows

To get access to a command prompt with a windows cd/dvd 
Press SHIFT+F10

Activate numlock on a tablet that does not have numlock button

Open notepad :

set WshShell = CreateObject("wScript.Shell")
WshShell.SendKeys "{NUMLOCK}"

and save as numlock.vbs

Run

Friday, November 6, 2015

Run an aplication or command on a remote computer

To install an application copy the setup file and then open a cmd and type :

wmic /node:computername /user:username /password:mypassword product call install true, "","\\computername\Users\Public\a.msi"

wmic /node:computername baseboard get product,manufacturer

wmic /node:computername ...

To run a cmd app with admin rights type in cmd :
runas /user:username cmd
 

Tuesday, October 13, 2015

How to check mssql version installed + install option

Open a cmd and type :

sqlcmd
select @@version
go
exit




Default instance is that you connect just by specifying the server name (eg, MYSERVER), whereas a named instance will require an instance name as well (eg, MYSERVER\SQL2005).

Clients can connect to the default instance using only the host name over the well-known 1433 port.
To connect to a named instance, clients specify the host and instance name (e.g. "MyHost\My_Instance") and the SQL Server Browser service returns the port the named instance is listening on.

Wednesday, October 7, 2015

How to view motherboard name in windows

After installing a system if you don't know the mb manufacturer and/or model so you can install drivers - without any 3rd party software you can use :

Win+R => type :
msinfo32
dxdiag

sometimes these provide the information sometimes they dont.

In those cases run in cmd :
wmic baseboard get product,Manufacturer,version,serialnumber

or just

wmic baseboard get product,Manufacturer

or to get all data :

wmic baseboard list full /format:hform > %temp%\a.html
start %temp%\a.html


http://www.pearsonitcertification.com/articles/article.aspx?p=1700427&seqNum=4
wmic output customisation

Thursday, October 1, 2015

Format SD card - USB stick with FAT32 vs NTFS

NTFS has over fat32 the following :

- supports files bigger then 4GB and capacity over 2TB
- is a journaling file system where changes to files are logged to a jurnal before there are mode ( good in case of a power loss while writing, it wont need to scan all disk)
- support file permissions with user ID, read only etc

Advantages of FAT32 is that no journaling means less writes to the disk so longer life, no file permissions that cause problems when moving the media from one device to another


Allocation unit while formatting :
- smaller size better for space efficiency - if you have many small size files. Ex a 10kb file will need 5 2kb blocks if you chose 2kb allocation unit and when reading will require 5 blocks to be read.
- bigger size for better performance - it will read the data faster, but it will waste space on smaller files - but unnoticeable on larger size disks.

Wednesday, September 30, 2015

Windows cannot connect to the printer" - Operation Failed with error 0x00000002

First time try to restart the Printer spool service - and that might fix it.
If that fix it but next reboot  you printer does not work create a file restart_print_spool.bat and copy it in  %USERPROFILE%\AppData\Roaming\Microsoft\Windows\Start Menu\Programs\Startup
and write in it :
sc stop "Spooler"
sc start "Spooler"

When you try to add a shared network printer you receive :
Windows cannot connect to the printer" - Operation Failed with error 0x00000002

Open : Control Panel\Hardware and Sound\Devices and Printers - press Add Printer


Select Create a new port - Type of port - Local Port - and type \\network_location\shared_printer_name
Next select printer manufacturer and printer model - provide driver and next until finish.

Wednesday, September 16, 2015

HP servers raid config ORCA raid 1 level

In hp servers raid utility ORCA (Option ROM Configuration for Arrays) - press F8 to enter configuration - to createa a RAID 1 mirroring you have to select RAID 1+0

 HP Array Configuration Utility User Guide : pg 64
http://www.hp.com/ctg/Manual/c00709035.pdf 

In a RAID 1+0 configuration, data is duplicated to a second drive
They don't make no differentiation between RAID 1 and RAID 1+0 - it depends on how many HDDs you select.

Friday, September 11, 2015

Star Wars Episode IV on telnet

Open telnet or just use putty as telnet is not part of windows from vista.
towel.blinkenlights.nl

Thursday, September 10, 2015

Enable ssh on a cisco router

Login to the router via com or aux port.

Router>enable
Router#config t
Router(config)#hostname myRouter
myRouter(config)#username s86d password cisco

myRouter(config)#crypto  key generate rsa-general-keys modulus 1024
myRouter(config)#ip ssh version 2

myRouter(config)#line vty 0 4
 myRouter(config-line)#transport input ssh
 myRouter(config-line)#login local
myRouter(config-line)#exit
 myRouter(config)#copy running-config startup-config

Wednesday, September 9, 2015

Install windows 8, 8.1 and related windows server 2012, 2012 R2 without a product key

You have to edit/create the file disk:/sources/ei.cfg
 
[Channel]
Retail
[VL]
0
 
[Channel] can be set to OEM / Retail
[VL] means Volume Licensing for volume media for companies that use same key
[EditionID] to Core / Professional etc or leave black and it will ask during setup

To activate windows after install use the wizard or cmd : slui 3

To add the file to the windows iso file you can use PowerIso - note you need regiestered version. 

Tuesday, September 8, 2015

How to delete a service manually

You can see all services in the snap-in control Services : services.msc

To delete a service copy the service name from the snap-in control then type :

sc delete "service name"

Monday, September 7, 2015

Access network share or map network location from cmd

To get faster access to a network share or to access a network share that requires username and password type at cmd :

net use \\computername\ipc$ password /user:username

To map a network location type :

net use n: \\computername\sharename password /user:username

To delete a maping :

net use n: /delete