Jedidiah's profileTechnically ChristianPhotosBlogListsMore Tools Help

Technically Christian

Tech and Theology

Search

Loading...

Jedidiah Hammond

Occupation
Location

LinkedInABox Gadget

Loading...
July 03

Windows 2008 core Command reference

Basic Setup

Load Drivers

  • pnputil -i -a c:\PathToDriver\*.inf

Configure IP

  • netsh interface ip set address name="Local Area Connection" static {IP} {Sub Mask} {gateway}
  • netsh interface ip set dns "Local Area Connection" static {DNS Server IP}

 

Rename NIC

  • netsh.exe interface set interface name = "Local Area Connection 3" newname = "Storage"

Disable DHCP

  • HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\Tcpip\Paremeters\interfaces\guid
  • enabledhcp 0=off  1=on

Disable Firewall

  • netsh firewall set opmode mode=disable

Open Ports in firewall

  • netsh firewall set icmpsetting 8 enable
  • netsh firewall add port TCP 3389 “Port 3389 opened for Remote Desktop"
  • netsh firewall add port ALL 5900 “Virtual Server control port”
  • netsh firewall add port TCP 137 “Port 137 opened for Virtual Server remote config"
  • netsh firewall add port ALL 135 “Port 135 opened for Virtual Server remote config"
  • netsh firewall add port ALL 3183 “Port 3183 opened for Virtual Server remote config"

Name Computer

  • Netdom renamecomputer %computername% /NewName:{new computer name}

Set Time

  • timedate.cpl

Change Install Key

  • cscript C:\Windows\System32\slmgr.vbs -ipk xxxxx-xxxxx-xxxxx-xxxxx-xxxxx

Activate Windows

  • C:\Windows\System32\cscript slmgr.vbs -ato

Windows Updates

  • wusa <update_package_name>.msu /quiet

Join Domain

  • Netdom join %computername% /domain:<domain> /userd:<domain>\<username> /passwordd:*

Enable Remote Desktop

  • Cscript %windir%\system32\SCRegEdit.wsf /ar 0

Change local Password

  • Net user administrator *

Add User

  • Net localgroup Administrators /add <domain>\<username>

Reboot

  • Shutdown –r

Install Roles

  • list roles                        oclist
  • install roles                    ocsetup

Promote RODC DCPROMO /adv = RODC

  • Promote DC dcpromo /unattend:unattend.txt (you will need a prepared unattend.txt file)

Advanced

Disable Auto Tuning

  • netsh interface tcp set global autotuninglevel=disabled
  • Disable IPV6
    -first unbind the ipv6 stack from the main lan interface:
  • -on core o/s launch regedit and export the following reg key before making any changes: hkey_local_machine\currentcontrolset\services\tcpip6
  • -go to the "Linkage" subkey and clear out the values from the Bind and Route strings completely, setting them to blank
  • -change the Export key's value to have only: \Devices\Tcpip6
  • -as noted already, disable ipv6 by:
  • -going to the "Parameters" subkey
  • -create a dword (matching your o/s type, 32bit/64bit) and name it DisabledComponents
  • -set the hex value to FF
  • -close everything out and reboot, once you log back in check ipconfig /all and you should no longer see any ipv6 info or stack bindings from the ip6 protocol

Enable remote Device Manager

  • Once you have the firewall configured to allow remote management, you then need to "Allow remote access to the PnP interface" on the Server Core box. To do that, on a Server installation open gpedit.msc and connect to the Server Core box.  Go to Local Computer Policy / Computer Configuration / Administrative Templates / System / Device Installation and enable "Allow remote access to the PnP interface". Reboot the Server Core box.

Backup

  • System State Backup
  • NTDSUTIL IFM
  • Create Full %
  • Create nosysvol
  • Create NoSysvol RODC %

Misc Commands

  • remote management winrm, winrs –quickconfig
  • Event Viewer       Wevtutil qe <event log name>".
  • Boot Config        BCDEDIT
  • Directory Service DSADD, DSMOD, DSGET, DSQUERY, DSRM
  • Windows Privileges CACLS, ICACLS, dsacls, dsrevoke
  • Bitlocker Manage-bde.wsf - bitlocker -protectors -get c:
  • Replication Repadmin
  • Server Management ServerManagerCmd
  • Create RODC %
  • System Backup
  • Wbadmin – Backup

 

Windows Auto Update

  • Cscript c:\windows\system32\scregedit.wsf /au 4
  • Net stop wuauserv
  • Net start wuauserv
  • Wuauclt /detectnow

WMIC Samples - http://blogs.technet.com/jhoward/archive/2005/02/23/378726.aspx

Update static IP address
wmic nicconfig where index=9 call enablestatic("192.168.16.4"), ("255.255.255.0")
Change network gateway
wmic nicconfig where index=9 call setgateways("192.168.16.4", "192.168.16.5"),(1,2)
Enable DHCP
wmic nicconfig where index=9 call enabledhcp
Service Management
wmic service where caption="DHCP Client" call changestartmode "Disabled"
Start an application
wmic process call create "calc.exe"
Terminate an application
wmic process where name="calc.exe" call terminate
Change process priority
wmic process where name="explorer.exe" call setpriority 64
Get list of process identifiers
wmic process where (Name='svchost.exe') get name,processid
Information about harddrives
wmic logicaldisk where drivetype=3 get name, freespace, systemname, filesystem, size, volumeserialnumber
Information about os
wmic os get bootdevice, buildnumber, caption, freespaceinpagingfiles, installdate, name, systemdrive, windowsdirectory /format:htable > c:\osinfo.htm
Information about files
wmic path cim_datafile where "Path='\\windows\\system32\\wbem\\' and FileSize>1784088" > c:\wbemfiles.txt
Process list
wmic process get /format:htable > c:\process.htm
Retrieve list of warning and error events not from system or security logs
WMIC NTEVENT WHERE "EventType<3 AND LogFile != 'System' AND LogFile != 'Security'" GET LogFile, SourceName, EventType, Message, TimeGenerated /FORMAT:"htable.xsl":" datatype = number":" sortby = EventType" > c:\appevent.htm

hvremote for hyper-v on core - http://code.msdn.microsoft.com/HVRemote

code http://code.msdn.microsoft.com/HVRemote/Release/ProjectReleases.aspx?ReleaseId=1827

June 05

Doing a Disaster Recovery on a Exchange Server that is also a DC

 

email_exchange_iconHave you every worked on a failed exchange server that also happens to be a DC (not recommended, but it happens)

Well if you do and you find yourself trying to recover it here is how you can.

  1. Note critical information
    1. What are the drive letters
    2. Where is the logs and database located
    3. What is the service pack level
  2. Remove data from server
  3. Format and re-install the OS – using the same drive letters
  4. Seize Roles if they were on the failed server
  5. Run through a metadata cleanup to remove the failed server from AD
  6. Replicate changes to all DCs
  7. Join rebuilt server to the domain  - Using the Same name
  8. Add the Server object to the correct exchange groups
    1. Exchange 2007 - “Exchange Servers” Exchange Install Domain Servers”
    2. Exchange 2003 - “Exchange Domain Servers”
  9. Windows Update the Server
  10. Do a disaster recovery install of exchange
    1. Exchange 2003 = setup /disasterrecovery
    2. Exchange 2007 = Setup.com /m:recoverserver
  11. Restore data using backup application or recovered databases from failure
  12. and away you go!
April 02

How to change a MOSS 2007 Site Collection URL

So im not sure if this is specific to MOSS 2007 (haven't tried on any other versions) but you can change a Share point Site collection URL without rebuilding or backup restore.......  
In the past I have used Chris's method which works every time. but it just seemed to cumbersome, well there is another way yay!!!!
 
You need to do 2 things
1. change Public URL  in alternate access mappings
and
2. change the host header in IIS
 
Here are the detailed steps
1. Alternate Access Mappings
    a. Open SharePoint central Admin -> operations tab-> Alternate Access Mappings -> (select your site Collection) -> edit public URL
    b. change the Default public URL to  the new one
2. IIS Host Header
    IIS 6. open iis -> select website -> right click -> properties -> Website tab -> advanced -> modify the host header to match the new URL
    IIS 7. open iis -> select website -> Click Bindings (far right)  -> select the hostname and set to the new URL
 
and viola your done!! your URL is changed
    
At least this works with MOSS 2007 Sp1 :-)

if this is usefull and is requested I can post screen shots
March 04

Exchange 2007 installed on 2008 DC cant communicate with 2008 domain controller (itself)

Situation
Exchange services will not start if the 2008 server that exchange is on is the only Domain Controller, it MAY start if there is another DC in the environment
 
Root Cause:
Windows Server 2008 has made TCP/IPv6 the default communication protocol stack over which connections are made by clients connecting to the server that is running Microsoft Exchange. (Exchange is a client of Active Directory)
If you disable or do not configure IPV6 you will have problems communicating with itself.
 
There are 2 possible solutions to this issue
 
1. Enable and Configure ipv6 to have a the same address as the IPV4 address Ex  "::FFFF:192.168.x.x"

2. Disable IPV6 and modify local "host" file 

a. Open the hosts file located at %SystemRoot%\system32\drivers\etc\ by using an editor such as Notepad. 

Note:   
In this step, %SystemRoot% refers to the local hard disk where the Windows system files are located.   

b. Search for the line that contains the term "localhost" by using the CTR+F key combination. 
c. Select the whole line and make it a comment by putting a number sign (#) at the beginning and end of the line. 
d. Press ENTER and, on the next line, type the following lines to provide the TCP/IPv4 address, hostname, and FQDN name for the Exchange server that is running both
the Client Access and Mailbox server roles: 
  <TCP/IPv4 address>   <host name of the computer> 
  <TCP/IPv4 address>   <FQDN of the computer> 

e. Click Save, and then close the file. 
 
f. Reboot the server

This Document explainse the cause root cause but is not targeted to this issue.
http://technet.microsoft.com/en-us/library/cc671176.aspx

 

February 24

Installing Windows mobile into a VM (With Network Access)

Installing Windows mobile into a VM (With Network Access)

Requires
Window Hyper-v
(I have not been able to get networking to work without docking on any other VM software, Tried: ESX 3.5, Vmware Workstation, Vmware Server, MS Virtual Server)
Guest OS Windows XP with all the updates (might work with Vista not tested)

1.       Install Virtual PC 2007 Sp1 in the guest (needed for network connectivity)

a.       Install Integration Components on the VM

b.      Use the Hyper-V synthetic NIC.

2.       Install  Windows Mobile Emulator

3.       Install Windows Mobile 6.1.4 Images

4.       Start WM 6.1.4 Professional

5.       On the mobile emulator

a.       click file

b.      configure

c.       network tab

d.      enable NE200 PCMCIA

e.       select Microsoft Virtual Machine Bus Network Adapter

f.        Click OK

 

6.       On the windows mobile device

a.       Click Start

b.      Settings

c.       Connections tab

d.      Connections

e.      Advanced Tab

f.        Select Networks

g.       Set Both network to “My Work Network”

7.       If you have DHCP available you now have network access from you emulator in the VM

8.       If DHCP is not available the configure you static IP in the emulator

a.       On the windows mobile device

                                                               i.      Click Start

                                                             ii.      Settings

                                                            iii.      Connections tab

                                                           iv.      Network Cards

                                                             v.      Select NE2000 compatible Ethernet Driver

                                                           vi.      Click Edit

                                                          vii.      Configure IP & Gateway on the IP address Tab

                                                        viii.      Configure DNS on Name servers tab

If you do not have access to Hyper-v or just want to use a different virtualization method you will need to use the “Dock Method”

Guest OS Windows XP with all the updates (might work with Vista not tested)

1.       Replace Step 5 With

a.       Install ActiveSync 4.5 in the XP Guest OS

                                                               i.      Run active Sync

                                                             ii.      Click File

                                                            iii.      Connection Settings

                                                           iv.      Allow Connections to one of the following

                                                             v.      Click the Drop Down Button and change to DMA

                                                           vi.      Click ok

                 

b.      In the XP guest Navigate to C:\Program Files\Microsoft Device Emulator\1.0

c.       Run dvcemumanager.exe

d.      Right click the GUID of your device and select “Cradle”

 

e.      Active Sync Will now Connect the device to the VM and you will have network connectivity that way

 
Loading...
Thanks for visiting!
Please wait...
Sorry, the comment you entered is too long. Please shorten it.
You didn't enter anything. Please try again.
Sorry, we can't add your comment right now. Please try again later.
To add a comment, you need permission from your parent. Ask for permission
Your parent has turned off comments.
Sorry, we can't delete your comment right now. Please try again later.
You've exceeded the maximum number of comments that can be left in one day. Please try again in 24 hours.
Your account has had the ability to leave comments disabled because our systems indicate that you may be spamming other users. If you believe that your account has been disabled in error please contact Windows Live support.
Complete the security check below to finish leaving your comment.
The characters you type in the security check must match the characters in the picture or audio.
Edenwrote:
Yay! you're 29 now!!!! sorry can't help it!! love u
Aug. 20
Edenwrote:
Hey Jedidiah, if I can't be 18 forever than you can't be 28 forever!!!! lol!! P.S. I am sure your blog will be very interestion and helpfull.....to people that have a little more brainpower than me!! lol most of it goes right over my head!!! I love you tons!!! and thanks again for your help with my blog!!!
Aug. 20
No namewrote:
 hello son, how are things in texas. just wanted to send a note saying howdy and God bless you! we all miss you and pray for you all daily.
love you, pa
July 25
Thank you!!!
 
June 21
Gloriawrote:
Just wanted to say hello, and very a Bless day   Smile
Mar. 3