Monday, April 22, 2013

Troubleshooting Server unable to look up internal FDQN "result too large", unable to RDP to server, but can browse and read eventlogs



 nslookup internaldomain.local
 Troubleshooting Server unable to look up internal FDQN "result too large", unable to RDP to server, but can browse and read eventlogs

Quick answer: port exhaustion, kb out there to fix this stuff.

nslookup
 internalserver.internaldomain.local can't find internaldomain.local: unspecified error


1. clear dns servers
2. added dns servers in Core Data centre
3. tried different dns servers in nslookup
3a. tried local dns server
4. modified host file with internal.local to server

fail

Check firewall (disable)
netsh advfirewall set allprofiles state off
result:
ok

Check Group Policy
Gpupdate /force
result:
Updating Policy...User Policy update has completed successfully.Computer policy could not be updated successfully. The following errors were encountered:The processing of Group Policy failed. Windows could not resolve the computer name. This could be caused by one of more of the following: a) Name Resolution failure on the current domain controller. b) Active Directory Replication Latency (an account created on another domain controller has not replicated to the current domain controller).
To diagnose the failure, review the event log or run GPRESULT /H GPReport.html from the command line to access information about Group Policy results.

check time
w32tm /query /peers

more nslookup
set debug
internaldomain.local
result
-------------
truncated answer
connect failed: result too large
-------------

check server's services
net stop dnscache
net start dnscache

net stop workstation
net start netlogon

Check Ports!
netstat -a -n
problem located - port exhaustion !!! 10000's of time_wait

----Hotfix Time---- (with bonus hotfix)
Windows6.1-KB2553549-v3-x64
Windows6.1-KB2264080-x64

there is a better rollup available(windows6.1-kb2775511-x64) but my server is not SP1. 

enjoy.

Thursday, April 18, 2013

Change CD DVD drive letter RAGE - task sequence



FOR /F "tokens=1 delims=:" %%A IN ('WMIC logicaldisk get drivetype^,deviceID^| FIND "5"') DO (
echo select volume %%A >%temp%\movecdrom.txt
echo assign letter z noerr >>%temp%\movecdrom.txt
diskpart /s %temp%\movecdrom.txt
)

uses wmic to locate which drive letter is actually the cdrom\dvd then moves it to Z drive.

Wednesday, March 27, 2013

Microsoft Anti-Virus Exclusion List

http://social.technet.microsoft.com/wiki/contents/articles/953.microsoft-anti-virus-exclusion-list.aspx

Monday, March 18, 2013

Build Import of DHCP Reservations - Powershell


Just followed ‘example 2’  - in the powershell command example  http://technet.microsoft.com/en-us/library/jj590686.aspx

Eg
Scopeid,IPAddress,Name,Clientid,Description
10.192.66.0,10.192.66.101,xx_L1_AP01,50-57-AC-9e-b1-26,SW - Gi1/0/47
10.192.66.1,10.192.66.102,xx_L1_AP02,d8-67-AC-95-5a-35,SW - Gi2/0/47
10.192.66.2,10.192.66.115,xx_L3_AP01,d4-8c-AC-04-72-e9,SW - Gi7/39
10.192.66.3,10.192.66.116,xx_L3_AP02,d4-8c-AC-2f-2b-ea,SW - Gi7/40

PS C:\> Import-Csv Path Reservations.csv | Add-DhcpServerv4Reservation -ComputerName koolkids.lc.local

pretty cool.
J

Thursday, February 14, 2013

Powershell and DNS

Was trying to search for static address in a large subnet that I was working on.

start off with reading - http://gallery.technet.microsoft.com/scriptcenter/DNS-Server-PowerShell-afc2142b

retrieve the records with
$records = Get-DnsServerResourceRecord -ZoneName koolkids.internal -computer kcdc

tried
$records| ? recorddata -like "10.10.*"

got nothing returned... :(

then check the types:
$records | get-member
DistinguishedName         Property   string DistinguishedName {get;}
HostName                  Property   string HostName {get;}
PSComputerName            Property   string PSComputerName {get;}
RecordClass               Property   string RecordClass {get;}
RecordData                Property   CimInstance#Instance RecordData {get;set;}
RecordType                Property   string RecordType {get;}
Timestamp                 Property   CimInstance#DateTime Timestamp {get;}
TimeToLive                Property   CimInstance#DateTime TimeToLive {get;set;}

notice that is was CimInstance#Instance for the RecordData
can't remember how to convert it to string on the fly.
so my colleague suggested 
$records | out-gridview

then do the filtering from there, which work nice.

if after a few coffees I remember how to sort this out. I will update.

Friday, November 30, 2012

Stuck at "Please wait for the Group Policy client..." on Windows 2008 R2

My fellow workmate and myself were working on a two servers that were recently handed over to us.

These servers had multiple nics. Did the usual checked and also change the network provider order to have the "production" network first, because this it the way I roll.

We both joined the servers to the domain, rebooted and everything was fine, could logon etc.
my workmates server was  Stuck at "Please wait for the Group Policy client..."

So did the usual ; trying to view remote event logs, force a remote shutdown (which didn't work).
Decided that it was the fact that the bind order was stopping the logon from working
(Tried remote netsh, that didnt work remotely for some reason, most likely me)

Solutions to fix the problem to allow logon:
Add the blue cable
Add network cable to all NICs on the box (I dont have physical access to the box)
this should give IP address to all NICs


Disable NICs in BIOS
If you in the BIOS disable network card this might also be a option

Remote Connection and Disable the NIC(S) via netsh
  1. download psexec from microsoft
  2. connect to remote server psexec \\<servername> cmd.exe
  3. perform a netsh interface ip show config or ipconfig /all
  4. review the network setup, write down the names of the unused NICs or NICS with 169.254 addresses
  5. go and disable the nics for example netsh interface set interface "Local Area Connection 3" DISABLED
make sure you don't disable the NIC you are working off! (of course)

Solution to fix the issue:
 change the network provider order to have the "production" network first,


Sunday, November 4, 2012

Seven Segment Ardunio Gear Display

Was discussing that there is a upgrade for a stock part that would allow my bike to have a seven segment gear display for my motorcycle.

with leanings from - http://www.stanford.edu/~sanjayd/gear_indicator.pdf

once I know it works might paste it on gstwin.com
here is the code - let me know if I need to pastebin

// assume 7segment anode common
// might need pulldown resistors on the gear inputs 8-13
// might need  a filter,etc for the inputs
// would really like to use a 4 bit to 7 segment toget away from using 1,2,13 inputs


int Gear1 = 8;
int Gear2 = 9;
int Gear3 = 10;
int Gear4 = 11;
int Gear5 = 12;
int Gear6 = 13;
int buttonState1 = 0;
int buttonState2 = 0;
int buttonState3 = 0;
int buttonState4 = 0;
int buttonState5 = 0;
int buttonState6 = 0;


void setup()
{
  pinMode(0,HIGH);
  pinMode(1,HIGH);
  pinMode(2,HIGH);
  pinMode(3,HIGH);
  pinMode(4,HIGH);
  pinMode(5,HIGH);
  pinMode(6,HIGH);
  pinMode(Gear1,INPUT);
  pinMode(Gear2,INPUT);
  pinMode(Gear3,INPUT);
  pinMode(Gear4,INPUT);
  pinMode(Gear5,INPUT);
  pinMode(Gear6,INPUT);

 }

void loop()
{
 PORTD=B0111111; // clear for no data aka netural
 buttonState1 = digitalRead(Gear1);
 buttonState2 = digitalRead(Gear2);
 buttonState3 = digitalRead(Gear3);
 buttonState4 = digitalRead(Gear4);
 buttonState5 = digitalRead(Gear5);
 buttonState6 = digitalRead(Gear6);
 if (buttonState1>0){PORTD=B1111001;} // 1
 if (buttonState2>0){PORTD=B0100100;} // 2
 if (buttonState3>0){PORTD=B0110000;} // 3
 if (buttonState4>0){PORTD=B0011001;} // 4
 if (buttonState5>0){PORTD=B0010010;} // 5
 if (buttonState6>0){PORTD=B0000010;} // 6
 delay(500);        // delay in between reads for stability
}