domingo, 4 de noviembre de 2018

WINDOWS. Remote Desktop Session. Connect - Disconnect remote session

Purpose

We will want connect to remote Windows server when all remote connection are in use. 

We need have administrator  privileges

Steps

From one domain's PC. Firt we need list the sessions in use. Open CMD and write....

Command: qwinsta 


We need kill one session

Command: rwwinsta 


Check Windows 2012R2
by GoN | Published: November 4, 2018 | Last Updated:

miércoles, 31 de octubre de 2018

WINDOWS. DC sync problems. DFSRDIAG

The other day I created a new DC. This process is very simple, but small problems appeared

AJ one Window Specialist detect que this new DC didn't sync and solved it.

Purpose

Solve the replication DC problem

Steps

My new DC is XXXXDC03, I have others 2 DC. 

Command: dfsrdiag backlog /rgname



He found the GUID that does't havet any GPO assigned



If you try explore for this route you have this error


Onetime delete this folder the AD start sync up OK





Check Windows 2012R2
by GoN | Published: October 31 2018 | Last Updated:

viernes, 21 de septiembre de 2018

LINUX. Ubuntu Configure Static IP Addresses


Purpose

Ubuntu have change the way to modify the network card configuration.

I explain how to configure it in the last ubuntu version



Steps

We need to go at file:



If we have the yellow mensage, we need before modify this detaliled configuration


Check it

Modify the new network config



Check again: sudo netplan apply

Check at Ubuntu 18 .04.1
by GoN | Published: September 21 2018 | Last Updated:

lunes, 17 de septiembre de 2018

WINDOWS. Network performance. Who is consuming my bandwidth

If you notice that the PC / Server is slow and you detect that it is a network problem, you can find who is consuming the bandwidth from a simple form


Ctrol + Alt + Del:




Go to:

And you can view the gilty



by GoN | Published: September 17 2018 | Last Updated:

martes, 28 de agosto de 2018

NAGIOS. Apply configuration problems. Error processing object config files

My last day before starting my vacation, Nagios had a major error. Nobody could make changes.

When I arrived from my vacation, my co-worker RM found a solution. I explain the steps:

The error

It is possible found others similar errors


Steps



When you press restart, it is possible the Nagios have errors

"Reading configuration data...
   Read main config file okay...
Error: Template '' specified in contact definition could not be not found (config file '/usr/local/nagios/etc/contacts.cfg', starting on line 89)
Error: Invalid max_check_attempts value for host 'CxxxxxxxxxxxN01'
Error: Could not register host (config file '/usr/local/nagios/etc/hosts/CxxxxxxxxxxN01.cfg', starting on line 16)
   Error processing object config files!"

In this output we can found the error. In this case is one contact, we have to connect to Nagios OS, found the file and delete this contact modifying the text configuration file.


I do not understand the cause because this error happens but In my case problem solved.

My recommendation is that before doing the procedure you have to have a backup.


Check at NagiosXI
by GoN | Published: August 29 2018 | Last Updated:

miércoles, 30 de mayo de 2018

ITIL Foundation Certificate

This month I have been very busy, very task at my work and very busy studing ITIL Foundation program.

Today I have one less task, I aproved the ITIL Foundation exam yesterday.




miércoles, 9 de mayo de 2018

WINDOWS. PS. Copy and rewrite one file

Purpose

Create script to copy and remplace one file, if the destination file exist, the destination file will be rewrite without any confirmation.

Steps

$Origen =    "\\nas03\c$\tmp\file.txt"
$Destino =   "\\nas02\d$\tmp\"
Copy-Item  -Path $Origen -Destination $Destino -Recurse -force


Check at Windows 2012R2 & W10
by GoN | Published: May 9, 2018 | Last Updated:

viernes, 4 de mayo de 2018

NAGIOS. Check domain expire data

Purpose

Create alerts to notify when a domain expires with our Nagios monitoring system.

Steps


Create the service


Assign one host

Check at NagiosXI
by GoN | Published: May 4, 2018 | Last Updated:

lunes, 23 de abril de 2018

WINDOWS. PS. What GPO has been Modified

To check the last 10 GPO modified:

Command: Get-GPO -all | Sort ModificationTime -Descending | Select -First 10 | FT DisplayName, ModificationTime, GpoStatus, Description



Check at Windows 2012R2 & W10
by GoN | Published: April 23, 2018 | Last Updated:


martes, 17 de abril de 2018

WINDOWS. PS. PowerShell Web Access - PSWA

This post could be util to access a PS console o script tools from web access.

One form to do it could be this...

[1] Install the AD tools for web Access

Command: Install-Windowsfeature WindowsPowerShellWebaccess -IncludeManagementTools

[2] It's necessary install one certificate, for this example we use one test certificate. For producction environtment it's not recomended configure a test certificate.

Command: Install-PswaWebApplication -UseTestCertificate

[3] Permissions. Configure Access Rules

For all computers
Command: Add-PswaAuthorizationRule -UserName * -ComputerName * -ConfigurationName *

Only for my computer
Command: Add-PswaAuthorizationRule -UserName * -ComputerName MyDomPc -ConfigurationName *

My recomendation, for users

Command: Add-PswaAuthorizationRule -UserName contoso\user1, contoso\user2, contoso\user3 -ComputerName TheSErver.contoso.com -ConfigurationName Microsoft.PowerShell

For remove access

Command: Remove-PswaAuthorizationRule -id 1


[4] Check & Result:



The credentials:

You can put any domain computer

The result

More info: 

https://docs.microsoft.com/en-us/powershell/module/powershellwebaccess/add-pswaauthorizationrule?view=winserver2012r2-ps
Check at Windows 2012R2 & W10
by GoN | Published: April 17, 2018 | Last Updated:

lunes, 16 de abril de 2018

WINDOWS. PS. klist. Kerberos. Activity krbtgt tickets

Running klist command shows the new Kerberos service ticket with RC4-HMAC encryption and it shows the tickets are in user memory.

Command: Klist

Command: Klist sessions



Check at Windows 2012R2 & W10
by GoN | Published: April 16, 2018 | Last Updated: April 23, 2018

viernes, 13 de abril de 2018

WINDOWS. PS. AD Roles

This is one way to know the Windows AD Roles.

Option 1:

Write-Host 'SchemaMaster' -ForegroundColor:Green
(Get-ADForest).SchemaMaster

Write-Host 'DomainNamingMaster' -ForegroundColor:Green
(Get-ADForest).DomainNamingMaster

Write-Host 'InfrastructureMaster' -ForegroundColor:Green
(Get-ADDomain).InfrastructureMaster

Write-Host 'PDCEmulator' -ForegroundColor:Green
(Get-ADDomain).PDCEmulator

Write-Host 'RIDMaster' -ForegroundColor:Green
(Get-ADDomain).RIDMaster




Option 2:

   $dc=Get-ADDomainController -Filter * 
    $dcs=$dc | Measure-Object | Select-Object -ExpandProperty count
    $dc | Format-Table Name,Ipv4Address,OperatingSystem,Site,IsGlobalCatalog,OperationMasterRoles -autosize -wrap
    Write-Host 'Total Number:    '$dcs""


Check at Windows 2012R2 & W10
by GoN | Published: April 13, 2018 | Last Updated: