Uncategorized

Average message calculator

https://blogs.technet.microsoft.com/toomasr/2014/06/16/finding-sentreceived-per-user-per-day-and-average-message-size/

Advertisements
Standard
Uncategorized

Outlook error moving folders

I have noticed below error while moving folders with in the outlook.

“Cannot copy this folder because it may contain private items”

This mostly there are private items in the folder trying to move.

Microsoft suggested solutions

https://support.microsoft.com/en-us/help/3205975/-cannot-copy-this-folder-because-it-may-contain-private-items-error-in

But in my case below steps helped to resolve the issue

  1. Open the shared mail box as default mail box (bit tricky with exchange 2013 and outlook 2013. I have to add a profile as my user mail box and modify the Data file settings going to control panel / Mail to the shared mail box name.)
  2. Open Outlook as the shared mailbox (or the user mail box) where we have issues with private items. Click on File, Account Settings and then Delegate Access.
  3. Click on Add, then find the account of the user who is facing the issue.
  4. Select Delegate can see my private items (last one)
  5. Click save.

If we receive error complaining cannot delegate send on behalf two ways to solve.

  1. Add the above user send on behalf from Exchange (ECP or Shell).
  2. then the user will appear in the Access delegation window
  3. Delegate access to private items

or else

add the registry key

HKCU\Software\Microsoft\Office\14.0\Outlook\Preferences -> add DWORD “IgnoreSOBError” with value 1.
Restart Outlook

 

 

Standard
Uncategorized

FSMO Roles

FSMO roles are:

  • Schema master – Forest-wide and one per forest.
  • Domain naming master – Forest-wide and one per forest.
  • RID master – Domain-specific and one for each domain.
  • PDC – PDC Emulator is domain-specific and one for each domain.
  • Infrastructure master – Domain-specific and one for each domain

This can be transferred to a different DC after the domain Setup and is recommended to keep on two different DCs.

 

 

 

Do this only in case you no longer able to access the FSMO role holder DCs,

Also there is lot of things you have to consider before doing below steps and it is very well explained on Petri https://www.petri.com/seizing_fsmo_roles

I will not recommend to do these steps in a production environment.

Steps to seize the roles

On the domain controller where you want to seize the roles run NTDSUTIL

ntdsutil:
type and enter “roles”
type and enter “connections”
type enter “connect to server “local server name””
type and enter q

Now Seize Roles (accept the warnings with yes)

Seize naming master (please note its not domain naming master)
Seize infrastructure master
Seize PDC (please note its not PDC emulator)
Seize RID master
Seize schema master

 

 

 

Standard
Uncategorized

HTTP redirection to HTTPS

HTTP to HTTPS redirection with IIS7

  • Select the web site you want to modify
  • In the right section select the “URL REWRITE”
  • In the action menu section, select the “Add rule” options
  • Use the blank rule template
  • The following windows open
  • Enter a name for your rules
  • Expand the menu “Match URL”
  1. Select in the  “Requested URL” drop down, “Matches the Pattern”
  2. Select in the  “Using” drop down, “Regular Expression”
  3. Enter the folling pattern in the text box : “(.*)”
  4. Be sure that the “Ignore case” check box is checked
  • Select the “Condition” section
  • Click the “Add” button to create a new connection
  • Enter in the “Condition” text box : {HTTPS}
  • Select in the “Request URL” drop down : “Match the Pattern”
  • Enter in the “Pattern” text box : ^OFF$
  • Make sure that the “Ignore Case” check box is checked
  • Click the “OK” button to validate
  • Select the “Action” section
  • In the “Action Type” drop down, select “redirection”
  • In the text box “URL redirect” entrez : https://{HTTP_HOST}/{R:1}
  • Make sure that the check box “Append to query string” is checked
  • In the next drop down, select the “303” option
  • Click “Apply” in the upper right corner to save the new rules

 

From : http://www.lebleuet.net/redirection-de-http-a-https-avec-iis7

Standard
Uncategorized

DNS Details Export

Thanks to : http://www.lebleuet.net

How to generate statistics of your DNS server with powershell

On 6 January 2016, in DNS, IT Procedure, Powershell, Programming, by Himselff

Here is a litle script i’ve build by digging through differents article to match what i needed :

1

2

3

4

5

6

7

8

9

10

11

12

13

14

15

#Extracting the date

$day = get-date -Format dd

$month = get-date -format MM

$year = get-date -format yy

$hour = get-date -Format hh

$min = get-date -Format mm

$today = $day+$month+$year+”-“+$hour+$min

$myFile = “c:\DATA\stats” + $today + “.txt”

 

#Getting stats from each zone and send all to the text file

Get-DnsServerZone | select zonename | Get-DnsServerStatistics > $myFile

 

#Sending stats file per email

$PSEmailServer = “email server IP”

Send-MailMessage -From “dnsserver@domain.com” -To “who need the report@domain.com” -Subject $Today” DNS Stats” -Attachments $myFile

First save that into a .ps1 file and then run that through a schedule task with that batch file

@ECHO OFF
PowerShell.exe -Command “& ‘getstats.ps1’”
PAUSE

 

Standard
Uncategorized

Remove SMTP Address

Thanks to the blog : –

https://www.exchangecore.com/blog/powershell-removing-secondary-smtp-addresses-specified-domain/

$Mailboxes = Get-Mailbox -result unlimited
$Mailboxes | foreach{
for ($i=0;$i -lt $_.EmailAddresses.Count; $i++)
{
$address = $_.EmailAddresses[$i]
if ($address.IsPrimaryAddress -eq $false -and $address.SmtpAddress -like “*domainToRemove.com” )
{
Write-host($address.AddressString.ToString() | out-file c:\addressesRemoved.txt -append )
$_.EmailAddresses.RemoveAt($i)
$i–
}
}
Set-Mailbox -Identity $_.Identity -EmailAddresses $_.EmailAddresses

Standard