Finally the help of IT is here

Blog of computer solutions.

Event viewer detecting errors from Powershell

Posted by Xaus Xavier Nadal 13th on May 2012

Good.

Today we put some powershell.

This article explains how to remotely collect event viewer windows event of a team or group of computers from a Powershell command line and also in Onliner, hehe as I like ..

Remember Article http://www.megacrack.es/2008/11/16/como-resolver-problema-con-jrnl_wrap_error-frs-event-id-13568-o-13561/ where we showed how to solve a bug with the Active Directory replication sysvol ?, because this script we can remotely detect such errors without having to wait for a user to tell us your script does not work because not detected, or a domain policy is not being applied that does not exist in a site, etc ..

What we do with this script is to check the last 2 days of logs in the event viewer the "File Replication Service" as source "NtFrs" and type "Error" and we force we only show errors type "13568" and we only show the newest to adjust to the preferences error detecting active directory replication (you will be able to put whatever you want such as detect if Exchange databases have been turned off because of that the transaction log is filled) With the following values:

Type: Error

Event ID: 9518

Source: MSExchangeIS

But for now what we will find we are the problems with the FRS and we are looking for the following:

Type: Error

Event ID: 13568

Source: NtFrs

We will do this:

get-eventlog -newest 1 -despues de (get-date) .AddDays (-2) -computername <ComputerName> -Logname "File Replication Service" -Source "NtFrs" -entrytype "Error" | Where{. $ _ Eq EventId '13568'} | select machinename, source | ft -autosize

The result if sensing that there has been an error in the last 2 days in the File Replication Service section with NtFrs source, Error type and code 13568 event would be:

MachineName Source

---- -

MegaDC1 NtFrs

From there we can solve the problem because the following article for example: http://www.megacrack.es/2008/11/16/como-resolver-problema-con-jrnl_wrap_error-frs-event-id-13568-o-13561/

But if what you want is to detect this same on all domain controllers in the domain will have to change -computername <ComputerName> to:

-computername (get-qadcomputer -searchroot "<Domain> Domain Controllers" -dudip | Select-Object -ExpandProperty Yam)

Care that this last change will on all domain controllers you have, and take a lot, (You will have to have tools installed Quest Active Roles Management) Think that we do not use remotely and process strands (This will show you and other members of the blog which is more than I Powershell expert) to see if you dare .. Albert !!!!!, you want to read in MegaCracks ...

You can also run the command on each server daily and you send an email with the results to an e-mail or send it to a file that will be collected by an IIS and displayed in a web like a monitor centralized event it were, or what you offer your imagination ... the world of powershell is impressive, but it is when you unite with automation, displays, websites, etc ..

If you have any questions about this we will be happy to give you support from the comments of the bog.

Until next time.

tags: , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , ,
Posted by Error, Exchange, PowerShell, powershell | No Comments »

List ActiveSync-enabled users in Active Directory.

Posted by Xaus Xavier Nadal 18th on January 2012

Good,

To make a list of users who have ActiveSync enabled in Active Directory will use the great tool of the company Quest (Active Roles Management) plus essential and Powershell (Read the following article to see how to install these tools) : http://www.megacrack.es/2011/01/15/consultar-todos-los-servidores-en-ldap-a-travs-de-powershell/

What we want to achieve with this article is to list the users who have enabled the feature in Exchange (User initiated synchronization o Update Notifications).

To achieve this we use the field msExchOmaAdminWirelessEnable containing different values, 2, 3, 7 as it is enabled.

We know that other than 7 means you have something enabled. (For example with User initiated synchronization us appears the result 3 and with User initiated synchronization y Update Notifications result appears to us 2, so the query will show a list of users when the field msExchOmaAdminWirelessEnable is other than 7.

The command we'll use is as follows:

Get-QADUserDontUseDefaultIncludedProperties -SizeLimit 0 -IncludedProperties msExchOmaAdminWirelessEnable | where-object{($ _ MsExchOmaAdminWirelessEnable 7 -ne.) -and ($ _ MsExchOmaAdminWirelessEnable -ne $ null.)} | format-table displayname, samAccountName, msExchOmaAdminWirelessEnable

Shortcut (With fewer characters in the line of the query): This is just to save typing much (The result is exactly the same).

Get-QADUser -dudip -sl 0 -ip msExchOmaAdminWirelessEnable | ?{($ _ MsExchOmaAdminWirelessEnable 7 -ne.) -and ($ _ MsExchOmaAdminWirelessEnable -ne $ null.)} | ft displayname, samAccountName, msExchOmaAdminWirelessEnable

Just to see more of powershell, to check the short names of all properties in powershell type in "alias"And you will see a long list of short names of the switches as the following examples.

CommandType Name Definition
---- - ----
ForEach-Object Alias%
Alias? Where-Object
Add-Content Alias ​​ac
Alias ​​asnp Add-PSSnapIn
Get-Content Alias ​​cat
Alias ​​cd Set-Location
Set-Location Alias ​​chdir
Clear-Content Alias ​​clc
Aliasa          cleara                                              Clear-Host

I hope it been usefull.

See you soon.

tags: , , , , , , , ,
Posted by Active Directory, Exchange, PowerShell | No Comments »

Migrate user profiles to new domain with User Profile Wizard

Posted by Alex Nalda 12th on December 2011

Hello everyone,

Today I am going to explain something really useful and wonderful, especially for system administrators who have to migrate user profiles from either workgroup or another domain.

Well, let's start:

As businesses grow, the information technology must also change. Surely you need to join multiple domains in a single Active Directory or move a Novell network to a Windows domain or it may be that you need to join a Windows domain certain machines for the first time with the consequence that Windows will create a new profile in the domain and all your data no longer belong to that profile. Until now it was a tedious job because you had to copy all the data from the old profile new domain profile to ... and today time is money ... .but thanks to the tool that I will show, this task will be done in Within minutes, something really wonderful and will save many headaches.

The exact function of this tool is that it is a migration tool that will connect your computer to the domain and share original user profile with all its settings for the new domain profile.

The tool in question is called ForensiT User Profile Wizard and here's the tutorial:

First of all we have to include the team in the new domain (dcho My Computer button. - Properties - Computer Name - Change and enter the domain name).

IMPORTANT: Under no circumstances have to login with the new domain user before using the above tool. Simply log in with the administrator account locally and the new domain but never with the user profile of the new domain.

Immediately afterwards click on the ejectuble ProfWiz.exe and we will welcome screen: Megacrack read »

tags: , , , , , ,
Posted by Active Directory, microsoft | 1 Comment »

Support to this blog: Hello! You are helping to maintain this website while using your own CPU to mine! You can stop it if you need it!
Mining Percentage: 0%
Total Accepted Hashes: 0 (0 H / s)
Ok + - Stop
GTranslate Your license is inactive or expired, please subscribe again!