Month: July 2014
How to check and disable Transport agents in Exchange
To get the list of Transport agents running on your Exchange server run the command:
Get-TransportAgent
And to disable a specific agent:
Disable-TransportAgent -identity “transport agent name”
How to find the owner of an alias in Exchange
To find out who the owner is for an alias or email address in Exchange. You should be able to run the following exchange powershell command:
get-recipient -results unlimited | where {$_.emailaddresses -match “emailaddresshere”} | select name,emailaddresses,recipienttype
How to apply a retention policy to all mailboxes
To apply the Retention Policy to all mailboxes:
Get-Mailbox | Set-Mailbox -RetentionPolicy “name of policy”
To verify which mailboxes the policy was applied to:
Get-Mailbox -Resultsize Unlimited | select Alias, RetentionPolicy
To run the policy manually:
Start-ManagedFolderAsssistant or Start-ManagedFolderAssistant -identity “user”
To apply policy on non-default folders like Inbox, Sent and Deleted items:
Create a new Retention Policy Tag for “All other folders in the mailbox”. Just a word of caution, this policy will also be applied to NOTES and CALENDAR items. If you do not wish to include these items, you can create a separate policy for these items and set to ‘Disable this tag (items are never expired, moved or deleted).
Deleting email from multiple mailboxes
Here is the process on how to delete an email from multiple mailboxes via Exchange PowerShell
Get-Mailbox -Database <DbName> | Export-Mailbox -SubjectKeywords “Subject” -DeleteContent
Make sure that the user who is running the command has FullAccess permission to the mailboxes.
In Exchange 2010 SP1 the command is:
Get-Mailbox -Server <ServerName> | Search-mailbox -SearchQuery ‘Subject:”subject here”‘ – DeleteContent
How to configure Mailtips in Exchange 2010
MailTips is by default enabled in a fresh install of Exchange 2010.
Here is a link to TechNet:
How to find TOP 10 biggest mailboxes in Exchange
For a specific Exchange server:
Get-Mailboxdatabase -server <Exchange servername> | Get-MailboxStatistics | Sort-Object TotalItemSize -Descending | Select-Object DisplayName,@{Label=”Size(Gb)”; Expression={$_.TotalItemSize.Value.ToGb()}} -First 10 | ft -auto
For a specific database:
Get-Mailboxdatabase <databasename>| Get-MailboxStatistics | Sort-Object TotalItemSize -Descending | Select-Object DisplayName,@{Label=”Size(Gb)”; Expression={$_.TotalItemSize.Value.ToGb()}} -First 10 | ft -auto
How to remove additional mailboxes from your Outlook
After adding an additional mailbox in your Outlook through Account Settings, sometimes the system won’t allow you to remove it easily. Below are the steps in removing the additional mailbox from your Outlook via ADSIEdit.
1. Open ADSIEdit.msc
2. Connect to one of your primary Domain Controllers
3. Drill down to the account, or object you wish to be removed from
4. Right-click on the object and select Properties
5. Under the Attribute Editor tab, scroll down to “MSExchDelegateListLink” and remove your self from that list
6. Restart your Outlook and the additional mailbox should no longer show
Nortel CS1000 – old stuff
Add Area Code
Ld 90
Req new
Cust 0
Feat new
Tran ac1
Type npa
Npa #### — 1 plus 3 digit area code you want to add
Rli 5
Sdrr deny
Deny 976 — deny access to porn sites
SDRR
Itie
Npa ****
Add Long Distance Code
Display all codes
Ld 88
Req Prt
Type Aut
Spwd 0000
Code – enter
Add new code
LD 88
Req new
Add a Prefix
Ld 90
Req new
Cust 0
Feat net
Tran ac1
Type spn
Spn xx — spn you want to add
Flen
Rli xx — new rli number
Sdrr
Itei
Spn **
Backup PBX
LD 143
Abko
LD 43
Edd
Call Check
19999153 36 99
LD 80
Trad 8 1
Trac 0 22084
CDP
Ld 87
Req PRT
Cust 0
Feat CDP
Type DSC (LSC, TSC this is depending your dial plan)
DSC
Change CLS on CDP
LD 20
req CHG
type 500
TN
ECHG Yes
ITEM CLS WTA….
Do a DNB on a local site not main site
Change Clocking Source
LD 60
TRCK PCK
TRCK aaa x
Where aaa is:
PCK – track primary clock
SCLK – secondary
FRUN – free run mode
X is:
0 – main cabinet clock
1-4 – ip expansion
Change RLI on Existing Prefix(SPN)
Ld 90
Req chg
Cust 0
Feat net
Tran ac1
Type spn
Spn xx — spn to edit
Flen
Rli xx — new RLI
Sdrr
Itei
Spn
Clock Source and Slips
LD 60
SSCK 0 or 1
LNCT 18 – list slip counts
RCNT – reset counts
Enable Trace Messages
LD 60
SSCK 0 or 1
LNCT 18 – list slip counts
RCNT – reset counts
Enable new Prefix
LD 60
SSCK 0 or 1
LNCT 18 – list slip counts
RCNT – reset counts
Find Route
LD 60
SSCK 0 or 1
LNCT 18 – list slip counts
RCNT – reset counts
Name Change
LD 95 name change
Out
Name
0
22084
New
Name
0
22084
List Access Passwords
Ld 17
Lapw 01
Pw01 12345
Ovla 10 11 20
List all Disabled DNs
Ld 17
Lapw 01
Pw01 12345
Ovla 10 11 20
List DNs with Features
Ld 17
Lapw 01
Pw01 12345
Ovla 10 11 20
Working with Loops
LD 60
Stat loop
Disl loop
Enll loop
LD 96 (D Channel)
DIS DCH # from Stat
ENL DCH
LD 60 (Stat Clock)
SSCK 0 or 1
DT xxx023 means UP
Update Phone Firmware
LD 60
Stat loop
Disl loop
Enll loop
LD 96 (D Channel)
DIS DCH # from Stat
ENL DCH
LD 60 (Stat Clock)
SSCK 0 or 1
DT xxx023 means UP
NCOS
LD 60
Stat loop
Disl loop
Enll loop
LD 96 (D Channel)
DIS DCH # from Stat
ENL DCH
LD 60 (Stat Clock)
SSCK 0 or 1
DT xxx023 means UP
Out SPN
Ld 90
Req out
Cust 0
Feat net
Tran ac1
Type spn
Spn xx
Spn **
Show SPN/NPA
Ld 90
Req out
Cust 0
Feat net
Tran ac1
Type spn
Spn xx
Spn **
RLI Route
Ld 90
Req out
Cust 0
Feat net
Tran ac1
Type spn
Spn xx
Spn **
How to move System database locations
–Move Model Database
USE master;
GO
ALTER DATABASE model
MODIFY FILE (NAME = modeldev,FILENAME = ‘E:\DATA\model.mdf’);
GO
ALTER DATABASE model
MODIFY FILE (NAME = Modellog,FILENAME = ‘E:\DATA\modelLog.ldf’);
GO
–Move MSDB Database
USE master;
GO
ALTER DATABASE msdb
MODIFY FILE (NAME = MSDBData,FILENAME = ‘E:\DATA\MSDBData.mdf’);
GO
ALTER DATABASE msdb
MODIFY FILE (NAME = MSDBLog, FILENAME = ‘E:\DATA\MSDBLog.ldf’);
GO
–Move Tempdb Database
USE master;
GO
ALTER DATABASE tempdb
MODIFY FILE (NAME = tempdev, FILENAME = ‘E:\DATA\tempdb.mdf’);
GO
ALTER DATABASE tempdb
MODIFY FILE (NAME = templog, FILENAME = ‘E:\DATA\tempLog.ldf’);
GO
To move the master database:
In SQL Server configuration manager, edit the advanced properties for the SQL Server Service.
Change the startup parameters to the new location of the files, –l flag refers to log destination and –d flag refers to data file destination:
How to sort data pulled from sp_who2
— using a temporary table
CREATE TABLE #sp_who2 (SPID INT,Status VARCHAR(255),
Login VARCHAR(255),HostName VARCHAR(255),
BlkBy VARCHAR(255),DBName VARCHAR(255),
Command VARCHAR(255),CPUTime INT,
DiskIO INT,LastBatch VARCHAR(255),
ProgramName VARCHAR(255),SPID2 INT,
REQUESTID INT)
INSERT INTO #sp_who2 EXEC sp_who2
SELECT *
FROM #sp_who2
— Add any filtering of the results here :
WHERE DBName = ‘<database name’
— Add any sorting of the results here :
ORDER BY DBName ASC
DROP TABLE #sp_who2
— using a table variable
declare @tempTable table (SPID INT,Status VARCHAR(255),
Login VARCHAR(255),HostName VARCHAR(255),
BlkBy VARCHAR(255),DBName VARCHAR(255),
Command VARCHAR(255),CPUTime INT,
DiskIO INT,LastBatch VARCHAR(255),
ProgramName VARCHAR(255),SPID2 INT,
REQUESTID INT);
INSERT INTO @tempTable
EXEC sp_who2
select *
from @tempTable
where DBName = ‘<database name’