Get-EventLog -listYou can then take any of the log types and view information about them. To see System information:
Get-EventLog SystemThere will be too much information in many of these cases, so use the -newest option to see just the latest:
Get-EventLog system -newest 5The list will have an Index number and an EventID. The EventID can then be used to research information about each error code. For example, at http://eventid.net.
krypted February 8th, 2014
net stop smtpsvc net start smtpsvcAnd viola, you’re joining the good fight against evil spammers. Sleep better tonight! Note: You get extra credit if you thought “it is soooooo 90s to allow SMTP traffic on any network you control! Do you worship Jeremy Piven’s character from PCU or what?!?!” Note2: You get double extra credit if you happened to step in tar at the La Brea Tarpits while reading this article as I thought about writing it when almost stepping in some tar at the very same place.
krypted June 27th, 2013
Add-WindowsFeature NET-Framework,RSAT-ADDS,Web-Server,Web-Basic-Auth,Web-Windows-Auth,Web-Metabase,Web-Net-Ext,Web-Lgcy-Mgmt-Console,WAS-Process-Model,RSAT-Web-Server,Web-ISAPI-Ext,Web-Digest-Auth,Web-Dyn-Compression,NET-HTTP-Activation,RPC-Over-HTTP-Proxy,Web-WMI -RestartFor the Edge Transport role, use:
Add-WindowsFeature NET-Framework,RSAT-ADDS,Web-Server,Web-Basic-Auth,Web-Windows-Auth,Web-Metabase,Web-Net-Ext,Web-Lgcy-Mgmt-Console,WAS-Process-Model,RSAT-Web-Server,Desktop-Experience -RestartFor the Unified Messaging role, use:
Add-WindowsFeature NET-Framework,RSAT-ADDS,ADLDS -RestartAfter the server restarts, also configure NetTcpPortSharing:
Set-Service NetTcpPortSharing -StartupType AutomaticOnce the required features are installed, you can then run the installer and extend the Active Directory schema to prepare for the new attributes required for the version of Exchange you’re installing (2010 for this article btw). To do so, use the setup.exe command. In this example command we’ll use the setup.exe located in c:ExchangeInstallers:
c:ExchangeInstallerssetup.exe /prepareschemaOnce the Schema is ready, then prepare AD:
c:ExchangeInstallerssetup.exe /prepareadThen, prep the domain:
c:ExchangeInstallerssetup.exe /PrepareDomainNote: For a full listing of what happens at the above stages of the installation, see TechNet 125224: http://technet.microsoft.com/en-us/library/bb125224(v=exchg.150).aspx Once that’s done, I like to do a quick sync of AD from the control with my schema FSMO role:
repadmin /syncallThen, for the easy part: install Exchange (in this case we’re installing Hub, CAS & Mailbox roles):
c:ExchangeInstallerssetup.exe /m:install /r:h,c,mAnd voila, you’ve now got an Exchange Server. Since this is a Mailbox server, an empty information store is created and store.exe should be running. Use Get-Mailboxdatabase to verify:
Get-Mailboxdatabase -statusYou can then move a database (e.g. to your SAN), since the default will be nested in the mdb folders in the Exchsrvr directory by using the move-DatabasePath cmdlet. Or use the move-storagegrouppath cmdlet to move the transaction logs. Once the information store is back online and any logs have been moved, check the connectors in Exchange. Use get-sendconnector to see any outgoing connectors and get-receiveconnector to see any incoming connector information. You can also use get-exchangecertificate to check any certs on the host and get-routinggroupconnector to see any information about routing group connectivity.
krypted June 11th, 2013
Tags: 2007, 2010, add-windowsfeature, Command line, exchange server, get-mailboxdatabase, hub transport, information store, install exchange, mailbox, Migration, move database, move-databasepath, move-storagegrouppath, power shell, repadmin, set-service, setup.exe
krypted September 13th, 2012
Posted In: public speaking