Showing posts with label Windows Server. Show all posts
Showing posts with label Windows Server. Show all posts

Wednesday, July 29, 2015

Creating Keytab for UNIX machines access in Active Directory

For UNIX servers can gain access to AD and that they can take an active object in AD as well as the possibility of SPNs we record for them, work with Kerberos authentication in a transparent, etc. What makes it all possible is the Keytab that is generated by Ktpass tool (native Windows tool).
Below example command to generate the Keytab (remembering that the computer object in AD must be previously created):
ktpass / princess host / COMPUTER.domain.test@DOMAIN.TEST / out NomeDoArquivo_host.keytab / crypto All / ptype KRB5_NT_PRINCIPAL -desonly / mapuser DOMAIN \ COMPUTER $ + rndPass
Replace:
COMPUTER = Computer Name
DOMAIN.TEST = Domain Name
DOMAIN = Netbios Domain
note: -Necessary align with the UNIX team to computer names and domain involved in the command will be charged with lowercase or uppercase letters.

Tuesday, July 28, 2015

10 PowerShell hot pedaling in your Exchange environment

As one Arrentino saying "How are you"?
Staff, the footprint here is as follows; put 10 hot commands for you streamline your daily tasks.
come on:
# 01 - Test-MAPIConnectivity -Identity EMAILDOUSUARIO@DOMINIO.COM | fl
This command being positive ensures that system services, such as Managed Folder Assistant and OWA able to successfully access the mailbox in question, it also brings that server information is located Database and the user's Mailbox. Bears the name of the Mailbox and the coolest, brings Latency. Not to mention that the camando also shows you the status.
# 02 - Get-MailboxDatabaseCopyStatus * | where {$ _ eq ContentIndexState "Failed".}
This is maniero Pakas Mermão. The more show this command is that it shows you which Databases are with the millennium bug's in the Index. Likes? It has more Mermão.
# 03 - Get-MailboxDatabaseCopyStatus * | where {$ _. ContentIndexState -eq "Failed"} | Update-MailboxDatabaseCopy -CatalogOnly
Recalls that the tip # 02 I said I had more? Command that you identified which Databases are with Millennium Bug in the Index, right? It is Mermão, now you correct. Is not it beautiful?
# 04 - Get-MailboxServer | fl name
Get-ClientAccessServer | fl name
Get-TransportServer | fl name
The above commands list the servers of their respective functions. Convenient and fast as well.
# 05 - Get-MailboxDatabase -Status | ft name, last -auto *
Get that is supimpa. The crazy list the status of the last backup (Full / incremental / copy) of databases.
# 06 - Move-ActiveMailboxDatabase NOMEDODATABASE -ActivateOnServer SERVERNAME -Confirm: $ false
Command to move mailbox.
# 07 - Get-Mailbox -Identity CONTADOUSUARIO | Get-MailboxPermission | fl
It happens sometimes, users report that they are receiving pop up asking for password. This command checks the access permissions.
# 08 - New-MoveRequest -identify CONTADOUSUARIO -TargetDatabase DATABASENAME -BadItemLimit 50 -AcceptLargeDataLoss
Comandinho supimpa to move users. And an environment that there are several rules that comanado Database is very useful.
# 09 - Get-MailboxServer -identity NOMEDOSERVERMAILBOX | Get-MailboxDatabase | where {$ _ name -match "NOMEDATABASE."} | Get-Mailbox
Cool command that shows users on the database.
# 10 - Get-Mailbox -identity EMAILDOUSUARIO@DOMINIO.COM | Select-Object Alias ​​| foreach-object {Get-MailboxFolderStatistics -Identity $ _ alias | select-object Identity, ItemsInFolder, FolderSize.}
This command is to close with a flourish. Get this shows all your folders created in your mailbox, items in your folder and the size of each.

I hope these tips to accelerate everyday tasks. Soon we will bring the TOP 10 PowerShell for Active Directory.

Kill TS sessions remotely

Classic problem: You try to connect remotely to a server via TS and no connections available ...
One of the possible ways to disconnect these sessions, is through an executable called RESET.EXE included in Windows 2003 and later (at least until Windows Server 2012R2 it still exists ... rss ... remembering that this EXE is also found in versions customers Windows).
Below is an example of the command syntax:
To list the sessions of the remote machine, run the following command:
query session / server: NomeDoServidor_ou_IP
The listing of the sessions is necessary, in order to have access to the session ID.
To "overthrow" the session, run the following command:
reset session IDdasessão / server: NomeDoServidor_ou_IP
I hope you find it useful!