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:

jueves, 12 de abril de 2018

WINDOWS. PS. Remote console.

Sometime you need connect to console in other computer. One way to do it...

Command: Enter-PSSession -ComputerName Name_SERVER -Credential user_ADM



One Example with variables:

$selected_host = Read-Host 'Select Host'
$selected_User = Read-Host 'Select Admin user'

Enter-PSSession -ComputerName $selected_host -Credential $selected_User


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

miércoles, 11 de abril de 2018

WINDOWS. PS. What is my public IP. Check Internet

If you need check what is you internet ip connection, you can use

command:  irm ipinfo.io



If you want contrast this info, there are some webs that offer similar information service




To check my computer internet connection.

Command: Test-NetConnection -InformationLevel Detailed





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