Lapas

ceturtdiena, 2015. gada 5. novembris

Windows7 connect to wifi before login

You cannot log in windows 7 with domain user because wireless is not connected on logon screen. This feature is available only on Windows 8, 8.1, 10.

Workaround:
1. Open REGEDIT HKLM\Software\Microsoft\Windows\CurrentVersion\Run

2. Add new string value with any name you like. For example WiFiAutoconnect

3. Set value: %comspec% /c netsh wlan connect name="MyWiFi" where MyWiFi is your wireless profile name.

otrdiena, 2015. gada 20. oktobris

otrdiena, 2015. gada 13. oktobris

Reset windows network state

Reset WINSOCK entries to installation defaults : netsh winsock reset catalog (change static ip to dhcp)
Reset TCP/IP stack to installation defaults : netsh int ip reset reset.log
Flush DNS resolver cache : ipconfig /flushdns 
Renew DNS client registration and refresh DHCP leases : ipconfig /registerdns 
Flush routing table : route /f (reboot required)

Change windows 8/2012 network status.

Change windows 8/2012 network status from Public to Private
Open PowerShell
Get your NIC InterfaceIndex: Get-NetConnectionProfile
Change status: Set-NetConnectionProfile  -InterfaceIndex XXX -NetworkCategory Private

Test server dns and dc

Open command prompt

NLTEST /DSGETDC:dc.local

DCDIAG /TEST:DNS /V /E /S:dc.local

piektdiena, 2015. gada 18. septembris

Excel revers find()

B1 - cell with string
~ - replace tilde(~) with other symbol if your string contains it.

=IF(ISERROR(FIND("\",B1)),B1,RIGHT(B1,LEN(B1)-FIND("~",SUBSTITUTE(B1,"\","~",LEN(B1)-LEN(SUBSTITUTE(B1,"\",""))))))

otrdiena, 2015. gada 15. septembris

Windows 7/8 enable NumLock on startup

Press Win + R and type in Regedit
Navigate to registry key HKEY_USERS\Default\Control Panel\Keyboard 
Right click on the “InitialKeyboardIndicators”, select Modify and change Value data to 2.

piektdiena, 2015. gada 10. jūlijs

Test bandwidth between two hosts

Install iperf CLI tool:
apt-get install iperf
or
download for windows from https://iperf.fr/

Run iperf as server on one host(192.168.0.1):
iperf -s

Run client on other host(192.168.0.100):

iperf -c 192.168.0.1 -t 30 -i 5

Output:
------------------------------------------------------------
Client connecting to 192.168.0.1, TCP port 5001
TCP window size: 64.0 KByte (default)
------------------------------------------------------------
[  3] local 192.168.0.100 port 49363 connected with 192.168.0.1 port 5001
[ ID] Interval       Transfer     Bandwidth
[  3]  0.0- 5.0 sec  53.8 MBytes  90.2 Mbits/sec
[  3]  5.0-10.0 sec  55.0 MBytes  92.3 Mbits/sec
[  3] 10.0-15.0 sec  54.2 MBytes  91.0 Mbits/sec
[  3] 15.0-20.0 sec  55.2 MBytes  92.7 Mbits/sec
[  3] 20.0-25.0 sec  54.1 MBytes  90.8 Mbits/sec
[  3] 25.0-30.0 sec  54.1 MBytes  90.8 Mbits/sec
[  3]  0.0-30.0 sec   327 MBytes  91.3 Mbits/sec


Use parameter -w 1m to specify TCP window size .

Detailed information: http://openmaniak.com/iperf.php
Information about TCP windowing: https://www.slashroot.in/ 

trešdiena, 2015. gada 8. jūlijs

trešdiena, 2015. gada 1. jūlijs

Force HP ILO to reset network interface

When you apply new network settings - ILO shows message: "There are pending changes that may not take effect until iLO is reset."
To force ILO reset use putty to ssh ILO and type commands:

cd /map1
reset


Source: eMware

otrdiena, 2015. gada 26. maijs

Export/Import DHCP server reservations list

Run CMD as administrator on source server

c:\> netsh dhcp server \\MY_SERVER_NAME scope 192.168.1.0 dump>c:\dhcp.txt

Delete unnecessary commands, update "server name" and/or "scope"
Run CMD as administrator on destination server

c:\> netsh exec c:\dhcp.txt

otrdiena, 2015. gada 12. maijs

Recover deleted user from Office 365

Connect to MSOnline using powershell and run the code:

Restore-MsolUser -UserPrincipalName user1@o365info.com -AutoReconcileProxyConflicts -NewUserPrincipalName user1@o365info.com

Source: o365info.com

trešdiena, 2015. gada 22. aprīlis

Cannot insert new column in Excel

Error message: "To prevent possible loss of data, Microsoft Excel cannot shift nonblank cells off the worksheet."

Select first unnecessary column -  CTRL+Shift+Right - selects all columns till end.

Press separately magic combination ALT, E, A, A (Clear All content)

Source: wizardofexcel.com

pirmdiena, 2015. gada 30. marts

Bypass powershell security warning

To bypass security warning when running scripts from UNC path, just run powershell with -ExecutionPolicy argument

PowerShell -ExecutionPolicy Bypass -File \\server\share\filename.ps1

ceturtdiena, 2015. gada 5. marts

Change Windows numlock status

Logon screen:
[HKEY_USERS\.DEFAULT\Control Panel\Keyboard]
Set InitialKeyboardIndicators = 2

Current user:
[HKEY_CURRENT_USER\Control Panel\Keyboard]
Set InitialKeyboardIndicators = 2

trešdiena, 2015. gada 21. janvāris

Create custom password settings for AD users server 2012 R2

Start-> Run-> adsiedit.msc
Locate CN=System -> CN=Password Settings Container 
Create new Object:
In the Create Object dialog box, under Select a class, click msDS-PasswordSetting
Value, type the name of the new PSO

Example values:
msDS-PasswordSettingsPrecedence - 10
msDS-PasswordReversibleEncryptionEnabled - FALSE
msDS-PasswordHistoryLength - 5
msDS-PasswordComplexityEnabled - TRUE
msDS-MinimumPasswordLength - 8
msDS-MinimumPasswordAge - 1:00:00:00 (1 day)
msDS-MaximumPasswordAge - 60:00:00:00 (60 days)
msDS-LockoutThreshold - 10
msDS-LockoutObservationWindow - 0:00:60:00 (60 minutes)
msDS-LockoutDuration - 0:00:60:00 (60 minutes)
msDS-PSOAppliesTo - “CN=u1,CN=Users,DC=DC1,DC=contoso,DC=com”


To disable account lockout policies, assign the msDS-LockoutThreshold attribute the value of 0.

Source:  technet.microsoft.com

ceturtdiena, 2015. gada 15. janvāris

Configure AD NTP synchronization

Run command promt as administrator.
Check time before sync:
echo %time%

Configure local time servers:
w32tm /config /manualpeerlist:pool.ntp.org /syncfromflags:MANUAL

net stop w32time
net start w32time

Check time after sync:
echo %time%

Force resync:
w32tm /resync 

Check settings:
reg query HKLM\SYSTEM\CurrentControlSet\Services\W32Time\Parameters
w32tm /query /source

Check status
w32tm /query /status

piektdiena, 2015. gada 9. janvāris

Disable 8.3 name creation on disk volumes

1. Check status for disk D:
fsutil 8dot3name query D:


2. Check global system seting
HKLM\SYSTEM\CurrentControlSet\Control\FileSystem\
NtfsDisable8dot3NameCreation set value to 2


3. Disable 8.3 name creation

C:\Windows\system32>fsutil 8dot3name set d: 1

Successfully set 8dot3name behavior.

C:\Windows\system32>fsutil 8dot3name query D:
The volume state for Disable8dot3 is 1 (8dot3 name creation is disabled).
The registry state of NtfsDisable8dot3NameCreation is 2, the default (Volume level setting).
Based on the above two settings, 8dot3 name creation is disabled on D: