Authortrasmuss

Import PST file to exchange mailbox from Powershell

New-MailboxImportRequest –Mailbox bruker –FilePath \servermappenavn.pst

Get SMTP adresses with CSVDE (commandline) in Exchange 2003

This one gives you username and primary Email address

csvde -f users.csv -r “(&(objectCategory=Person)(objectClass=user))” -l “sAMaccountname,mail”

 

This one gives you ALL email addresses connected to the user

csvde -f users.csv -d OU=SBSUsers,OU=Users,OU=MyBusiness,DC=Company,DC=no -r (mailnickname=*) -l “sAMaccountname,mail,proxyaddresses”

Get SMTP Adresses from Exchange 2007/2010 With Powershell

Get-Mailbox | select -expand EmailAddresses | %{$_.SmtpAddress}

Resolving eventid 12293 – KMS problem

1. Log on to your DNS server and open the DNS manager.
2. Navigate to the Forward Lookup Zone//_TCP.
3. Right click on the right window and select Other New Records… from the list.
4. Scroll down and select the Service Location (SRV) record type and click Create Record.
5. Fill in the fields as follow:

Service: _VLMCS
Protocol: _TCP
Priority: 0
Weight: 0
Port number: 1688
Hostname:

6. Click OK to create the record and click Done to close the Record Type window.
7. Go to the host that logs the error and restart the Software Licensing service.

After the Software Licensing service has been restarted you should see a Security-Licensing-SLC 12294 message in your Event Viewer stating that the publishing of the Key Management Service to your domain was successful.

Set recovery model to simple

Short 2 liner to set the recovery mode to simple on all databases:

Use master
select ‘ALTER DATABASE ‘ + name + ‘ SET RECOVERY SIMPLE’ from sys.databases where recovery_model_desc’SIMPLE’;

Get SMTP log in Powershell

In powershell (Excahnge Management Shell), use the following command:
Get-MessageTrackingLog

Install Telnet on Windows 7 / Windows 2008 Server

pkgmgr /iu:”TelnetClient”

Delete old backup files SQL script

The following script deletes .bak files older than 7 days from F:SharesBackup2Disk

DECLARE @DeleteDate datetime
SET @DeleteDate = DateAdd(day, -7, GetDate())
EXECUTE master.sys.xp_delete_file 0,N’F:SharesBackup2Disk’,N’bak’,@DeleteDate,1

Corrupt database in Exchange 2003

The following steps can be useful to diagnose or repair an exchange 2003 database that have been corrupted due to disk failures.

Using the tool eseutil.exe you can diagnose and repair a faulty Exchange database.

First:

Check for Clean Shutdown
Run the following commands
Eseutil /mh priv1.edb
Eseutil /mh pub1.edb

If you find the status Dirty shutdown, then attempt a Soft Recovery

Run the following command

Eseutil /r E00

If soft recovery fails, do a hard repair

Eseutil /p priv1.edb
Eseutil /p pub1.edb
Delete *.log
Mount and then dismount stores one at a time.

If you still get a error message when mounting the stores try the following:

Delete all logfiles. Check the option Exchange system manager -> Servers -> Servername -> Storage group -> Store -> Rightclick -> Properties -> database -> “This database can be overwritten by a restore”

Retry mount of store.

 

Install Telnet on Windows 2008 server Commandline

pkgmgr /iu:”TelnetClient”

Ref:


© 2019 IdefixWiki

Theme by Anders NorénUp ↑