Microsoft Windows server

How to setup Active Directory (AD) In Windows Server 2016

Windows server 2016 is the upcoming server operating system from Microsoft scheduled to be release sometime around the 3rd quarter of 2016. In this tutorial I will go through step by step on how to install the Active Directory ( AD ) role on Windows Server 2016. If you are setting up the server for production is recommended to set a static IP address on the server before you start the AD installation. Also before you start the AD installation, rename the server now if you need to, once you have installed the AD role on the server, it is not easy to change the name without breaking a lots of things.

read more »

Exchange Office365 Tips & tricks

Emails between O365 and On-premises do not work

Error message: 451 4.4.0 Primary target IP address responded with: “451 5.7.3 Must issue a STARTTLS commnd first” Office 365 Hybrid

In some scenarios you might need to, in your firewall:   Disable Content Inspection with TLS

 

more about in:

http://www.moh10ly.com/blog/office-365/emails-between-o365-and-on-premises-do-not-work

Code Snippets Microsoft Networking Tutorials

How to find a Global Catalog server?

With DNS Requests (NSLOOKUP)

In an Active Directory environment, all Global Catalogs are anchored in DNS . There is a separate subdomain ‘GC._msdcs ….’ in the namespace of the AD root domain (please remember: the global catalog does not refer to individual domains, but to the entire forest). So if your root domain in the forest is e.g. example.root, then you get a list of all GCs with this command:

C:\> nslookup gc._msdcs.example.root

Server:  dns01.example.root
Address:  10.127.60.3

Name:  gc._msdcs.example.root
Adresses:  10.127.60.100
10.127.60.102
10.127.60.103
10.127.77.1
10.127.77.130
10.127.93.2
10.127.93.12
192.168.35.1

The container _msdcs contains the infrastructural DNS records of the Active Directory. This is also where all the SRVservice records for the domain controllers are stored.

With DSQUERY

You can also use the standard command line tool DSQUERY for searching GCs. The search can be limited to certain domains or AD sites. However, you must be authenticated in the regarding forest and DSQUERY must be available on your machine (this is usually the case on Widows servers). As a result, the server objects in the Configuration partition is displayed:

C:\> dsquery server -isgc

“CN=DC001,CN=Servers,CN=Site-Sidney,CN=Sites,CN=Configuration,DC=example,DC=root”
“CN=DC014,CN=Servers,CN=Site-Auckland,CN=Sites,CN=Configuration,DC=example,DC=root”

C:\> dsquery server -isgc -domain "dev.example.com"

C:\> dsquery server -isgc -site "Site-Auckland"

Per Script with an LDAP filter
In the last section we have seen that the global catalog servers are present in the configuration partition of the directory as specific objects. Her we can look for them with our own script. These servers have set the first bit in their ‘options’ attribute. All we need is the appropriate LDAP filter:

ldapFilter = "(&(objectClass=nTDSDSA)(options:1.2.840.113556.1.4.803:=1))"

Set rootDSE = GetObject("LDAP://rootDSE")
configDN =   rootDSE.Get("configurationNamingContext")

Set ado = CreateObject("ADODB.Connection")
ado.Provider = "ADSDSOObject"
ado.Open "ADSearch"
Set objectList =   ado.Execute("<LDAP://" &configDN& ">;" & ldapFilter & ";distinguishedName;subtree")

While Not objectList.EOF
nTSDSA = objectList.Fields("distinguishedName")
serverDN = Mid(nTSDSA, 18)                                         'CN=NTDS Settings abschneiden => Server Objekt
Set serverObj = GetObject("LDAP://" & serverDN )

WScript.Echo serverObj.dNSHostName

objectList.MoveNext
Wend

 

 

Microsoft Networking

How Do I Find A List Of Global Catalog Servers Using Nslookup?

The following commands will list all Global Catalog Servers in your Active Directory domain:

  1. From the command prompt, type nslookup.
    • C:\nslookup
  2. Set the type to server.
    • >set type=srv
  3. Find the Global Catalog Server(s).
    • >_gc._tcp.<DnsForestName>
  4. Example:
    •  >_gc._tcp.“your domain.com”
  5. The results will include the hostname and IP address of each Global Catalog Server.
  6. Type “exit” to leave the nslookup session.

 

Tutorials Utils VB Visual Studio

Default certificate could not be created. Publish aborting

You need to tell the Publisher where to get the Certificate from:

  1. Go to Project-> Properties
  2. Go to the tab named “Signing”
  3. Check the Checkbox labeled ‘Sign the ClickOnce manifests’. This enables the section where you can point to a certificate.
  4. Click on the button labeled ‘Select From File…”. In the directory listing, choose a key file (.pfx) and Open.
  5. From the step 3, click the button labeled “More Details…”. This will display the certificate you’ve just selected.
  6. Click “Install Certificate” and follow the prompts.
  7. Save and Publish your Solution.
Tips & tricks Tutorials

Erro 105 (err_name_not_resolved)

Erro 105 é um erro chato que às vezes você encontrar ao usar o Google Chrome. Na realidade, este erro não é um problema com o Chrome, mas é um problema com a sua conexão com a internet e as configurações de DNS. Siga as instruções deste tutorial para corrigir o problema rapidamente.

Detalhes
Erro 105 é um erro de conexão que pode aparecer quando você estiver usando o Google Chrome. Ele pode aparecer a qualquer momento e não é causada por um determinado site. Quando você encontrar erro 105, você também vai ver a seguinte mensagem exibida:
erro 105 (net::err_name_not_resolved): não foi possível determinar o endereço dns do servidor.
Por que erro 105 aparecem no Chrome?

Há várias razões para erro 105 aparecerá. Eles estão todos relacionados com a configuração de sua conexão de internet e como o seu computador acessa a internet. É muito técnico, mas, essencialmente, o problema é causado pela forma como o computador está tentando se conectar à internet. Ele pode ser bloqueada pelo firewall ou pelo seu ‘router’.

Como corrigir o erro 105?

Existem três métodos para a fixação de erro 105. A melhor solução é alterar as configurações do Google Chome, que é bastante fácil de fazer (solução 2). Os outros dois envolvem redefinir algumas das suas conexões de internet e também verificar o seu regras de antivírus/firewall.
Solução 1
Esta solução irá repor o catálogo Winsock de volta para a configuração padrão. É seguro.
1. Abra o aplicativo cmd (prompt de comando),  Basta clicar no botão do Windows, digite cmd, Botão do Windows 7
2. Isto irá abrir uma janela preta Prompt de comando
3. Tipo: netsh winsock reset catalog
4. Pressione a tecla ENTER
5. Tipo: netsh int ip reset reset.log
6. Pressione a tecla ENTER
7. Reinicie o computador

read more »

Tips & tricks Tutorials

Speed comparison between USB 2.0, USB 3.0, SATA and Firewire

The theoretical maximums are as follows:

In bits per second, that is:

  • USB 1.1 = 12 Mbit/s
  • Firefire 400 = 400 Mbit/s
  • USB 2.0 = 480 Mbit/s
  • FireWire 800 = 800 Mbit/s
  • USB 3.0 = 5 Gbit/s
  • USB 3.1 = 10 Gbit/s
  • eSATA = Up to 6 Gbit/s (750 MB/s) right now as it depend on the internal SATA chip.
  • Thunderbolt = 10 Gbit/s × 2 (2 channels)
  • Thunderbolt 2 = 20 Gbit/s
  • Thunderbolt 3 = 40 Gbit/s

In Bytes per second, that is:

  • USB 1.1 = 1.5 MB/s
  • Firefire 400 = 50 MB/s
  • USB 2.0 = 60 MB/s
  • FireWire 800 = 100 MB/s
  • USB 3.0 = 625 MB/s
  • USB 3.1 = 1.21 GB/s
  • eSATA = 750 MB/s
  • Thunderbolt = 1.25 GB/s × 2 (2 channels)
  • Thunderbolt 2 = 2.5 GB/s

However, this does not provide the actual answer. As an example, FireWire 400 is a serial connection. The entire 400 Mbps is available for data transfer. USB 2.0 sends command and control data through the same connection the data uses limiting the 480 Mbps connection to 380 to 400 Mbps. When considering throughput the list looks entirely different.

https://en.wikipedia.org/wiki/List_of_device_bit_rates#Peripheral

Tips & tricks Tutorials

IP Ratings (Ingress Protection)

IP_Code_ProtectionTwo-digit number established by the International Electro Technical Commission, is used to provide an Ingress Protection rating to a piece of electronic equipment or to an enclosure for electronic equipment.

The protection class after EN60529 are indicated by short symbols that consist of the two code letters IP and a code numeral for the amount of the protection.

Example: IP65 (NEMA 4)
The two digits represent different forms of environmental influence:
• The first digit represents protection against ingress of solid objects.
• The second digit represents protection against ingress of liquids.

The larger the value of each digit, the greater the protection. As an example, a product rated IP54 would be better protected against environmental factors than another similar product rated as IP42.

read more »

SQL Server

SQL Server: The transaction log for database is full

Right-click your database in SQL Server Manager, and check the Options page. Switch Recovery Model from Full to Simple then right-click the database again. Select Tasks Shrink, Files. Shrink the log file to a proper size (I generally stick to 20-25% of the size of the data files).

Switch back to Full Recovery Model, and take a full database backup straight away.

You now need to figure out whether you need the ability to recover your database to a point-in-time. If so, schedule regular transaction log and perhaps differential backups according to the requirements of your business.

In case the business can live with a certain amount of data loss, schedule full backups and switch to Simple mode.

Code Snippets IIS wordpress

WordPress ISS Permalinks

Enabling Pretty Permalinks in WordPress

This walkthrough describes how to enable “Pretty Permalinks” for blog posts in the WordPress blog engine that is installed on IIS 7 and above. Typically, without URL rewriting functionality on a Web server, WordPress users must use “Almost Pretty” URLs, for example, http://contoso.com/index.php/yyyy/mm/dd/post-name/. By using the URL Rewrite module, you can use “Pretty Permalinks,” for example, http://example.com/year/month/day/post-name/, for WordPress blogs that are hosted on IIS.
Prerequisites

This walkthrough requires the following prerequisites:

IIS 7 or above with FastCGI and PHP installed. If you need to install PHP, follow the instructions in this article.
WordPress installed. If you need to install WordPress, follow the instructions in this article or use the instructions from the official WordPress site.
URL Rewrite installed.

Note that for the purposes of this walkthrough it is assumed that WordPress is installed in a Web site root directory. If WordPress is installed in a subdirectory, then the rewrite rules that are used in this walkthrough should be included in the Web.config file that is located within the same subdirectory where the WordPress files are.
Enabling Pretty Permalinks in WordPress

Use the following instructions to create pretty permalinks for your blog posts.

To enable pretty permalinks in Word Press:

Log on to WordPress with Administrator user rights.
In WordPress, click the Options tab.
On the Options page, click the Permalinks subtab.
This will take you to the page where you can customize how WordPress generates permalinks for blog posts.
On the Permalinks page, select Custom, specify below and enter “/%year%/%monthnum%/%day%/%postname%/” in the Custom structure text box.
Click Update Permalink Structure.

All the blog post links will have URLs that follow the format that you have specified, but if you click any one of those links the Web server will return a 404 – File Not Found error. This is because WordPress relies on a URL rewriting capability within the server to rewrite requests that have “pretty permalinks” to an Index.php file. In the next section, you will create a rule that will provide this capability.
Creating a Rewrite Rule

Open the Web.config file that is located in the same directory where the WordPress files are installed, and paste the following XML section into the system.webServer element:

<rewrite>
<rules>
<rule name="Main Rule" stopProcessing="true">
<match url=".*" />
<conditions logicalGrouping="MatchAll">
<add input="{REQUEST_FILENAME}" matchType="IsFile" negate="true" />
<add input="{REQUEST_FILENAME}" matchType="IsDirectory" negate="true" />
</conditions>
<action type="Rewrite" url="index.php" />
</rule>
</rules>
</rewrite>

This rule will try to match any requested URL. If the URL does not correspond to a file or a folder on the file system, it will rewrite the URL to the Index.php file. At that point, WordPress will determine which content to serve based on the REQUEST_URI server variable that contains the original URL before it was modified by this rule.
Testing the Rewrite Rule

After you save the rewrite rule to the Web.config file, open a Web browser and click any one of the permalinks in your WordPress blog. You should see the correct content returned by the Web server for each permalink.

Summary

In this walkthrough you learned how to use the URL Rewrite module to enable “pretty permalinks” in the WordPress blog engine. WordPress is just one example of the many popular PHP applications that can take advantage of the URL Rewrite module in IIS, a feature that enables user-friendly and search engine-friendly URLs.

 

 

By Ruslan Yakushev

http://www.iis.net/learn/extensions/url-rewrite-module/enabling-pretty-permalinks-in-wordpress