IMAP – 365 Migration Export Outlook – iOS doesnt show subfolder – folder structure

Hi,

I found an issue when exporting the user mailboxes from Outlook and Importing into 365.

All the data is there, including the tree structure. But you setup the connection on iOS and No SubFolder structure is there.

In Outlook if you right click on the folder the Type Will be An IMAP including a status : Filtered in the status Bar vs Item and Post as a Normal Folder.

To fix This issue : Run this Macro, this will let you select your TOP Folder and this will applied to the SubFolder.

Change Subfolders

This version of the macro above will walk the folder list and change all folders from IPF.Imap to IPF.Note. This uses the folder picker and you can choose the root folder (top of mailbox) to run it on all folders in your mailbox or a parent folder to run it only on that folder and it’s subfolders.

How to use macros

First: You will need macro security set to low during testing.

To check your macro security in Outlook 2010 or 2013, go to File, Options, Trust Center and open Trust Center Settings, and change the Macro Settings. In Outlook 2007 and older, it’s at Tools, Macro Security.

After you test the macro and see that it works, you can either leave macro security set to low.

Open the VBA Editor by pressing Alt+F11 on your keyboard.

To put the code in a module:

  1. Right click on Project1 and choose Insert > Module
  2. Copy and paste the macro into the new module
Option Explicit
Dim SubFolder As MAPIFolder

Sub ChangeFolderClassAllSubFolders()
    Dim i               As Long
    Dim iNameSpace      As NameSpace
    Dim myOlApp         As Outlook.Application
    Dim ChosenFolder    As Object
    Dim Folders         As New Collection
    Dim EntryID         As New Collection
    Dim StoreID         As New Collection
       
    Set myOlApp = Outlook.Application
    Set iNameSpace = myOlApp.GetNamespace("MAPI")
    Set ChosenFolder = iNameSpace.PickFolder
    If ChosenFolder Is Nothing Then
GoTo ExitSub:
    End If

    Call GetFolder(Folders, EntryID, StoreID, ChosenFolder)
        ChangeFolderContainer
        
    For i = 1 To Folders.Count
        Set SubFolder = myOlApp.Session.GetFolderFromID(EntryID(i), StoreID(i))
        On Error Resume Next
        ChangeFolderContainer
    
        On Error GoTo 0
    Next i     
ExitSub:      
End Sub
    
  
Private Sub ChangeFolderContainer()
Dim oFolder As Outlook.folder
Dim oPA As Outlook.PropertyAccessor
Dim PropName, Value, folderType As String

PropName = "http://schemas.microsoft.com/mapi/proptag/0x3613001E"
Value = "IPF.Note"

On Error Resume Next
Set oFolder = SubFolder 'Application.ActiveExplorer.CurrentFolder
Set oPA = oFolder.PropertyAccessor

folderType = oPA.GetProperty(PropName)
Debug.Print SubFolder.Name & " " & (folderType)

If folderType = "IPF.Imap" Then

oPA.SetProperty PropName, Value
Debug.Print "     Changed: " & SubFolder.Name & " " & Value

End If

Set oFolder = Nothing
Set oPA = Nothing
End Sub
     
    
Sub GetFolder(Folders As Collection, EntryID As Collection, StoreID As Collection, Fld As MAPIFolder)
    Dim SubFolder       As MAPIFolder
       
    Folders.Add Fld.FolderPath
    EntryID.Add Fld.EntryID
    StoreID.Add Fld.StoreID
    For Each SubFolder In Fld.Folders
        GetFolder Folders, EntryID, StoreID, SubFolder
    Next SubFolder
       
ExitSub:
    Set SubFolder = Nothing
       
End Sub
   

Reference :

Fix the Outlook Folder Type after Exporting an IMAP Account

 

QNAP – Raid Expand SLOW

Hi,

When you change RAID configuration in a QNAP you might have sometime slowness during the Expand of the disk.

To improve the speed, log in the QNAP in SSH (Enable it first if disable).

ssh admin@your_ip

Type the command : echo 25000 > /proc/sys/dev/raid/speed_limit_min

You do not need to reboot or restart the Expand. This value will be taken on the Fly.

J

Script to set internal and external URLs on all of your Exchange Virtual Directories at once

I will not take the credit for this But really nice scripts.

Copy this to a text file, save it with a .ps1 extension, and then open it and run it from the Exchange Management Shell ( ./.ps1 )

#ChangeAutodiscoverPath.ps1
#Changing InternalURL Path
$urlpath = Read-Host “Type Internal Client Access FQDN starting with http:// or https://”
Set-AutodiscoverVirtualDirectory -Identity * –internalurl “$urlpath/autodiscover/autodiscover.xml”
Set-ClientAccessServer –Identity * –AutodiscoverServiceInternalUri “$urlpath/autodiscover/autodiscover.xml”
Set-webservicesvirtualdirectory -Identity * –internalurl “$urlpath/ews/exchange.asmx”
Set-oabvirtualdirectory –Identity * –internalurl “$urlpath/oab”
Set-owavirtualdirectory –Identity * –internalurl “$urlpath/owa”
Set-ecpvirtualdirectory –Identity * –internalurl “$urlpath/ecp”
Set-ActiveSyncVirtualDirectory -Identity * -InternalUrl “$urlpath/Microsoft-Server-ActiveSync”
#Changing ExternalURL Path
$urlpath2 = Read-Host “Type External Client Access FQDN starting with http:// or https://”
Set-AutodiscoverVirtualDirectory -Identity * –externalurl “$urlpath2/autodiscover/autodiscover.xml”
Set-ClientAccessServer –Identity * –AutodiscoverServiceInternalUri “$urlpath2/autodiscover/autodiscover.xml”
Set-webservicesvirtualdirectory –Identity * –externalurl “$urlpath2/ews/exchange.asmx”
Set-oabvirtualdirectory –Identity * –externalurl “$urlpath2/oab”
Set-owavirtualdirectory –Identity * –externalurl “$urlpath2/owa”
Set-ecpvirtualdirectory –Identity * –externalurl “$urlpath2/ecp”
Set-ActiveSyncVirtualDirectory -Identity * -ExternalUrl “$urlpath/Microsoft-Server-ActiveSync”
#get commands to doublecheck the config
get-AutodiscoverVirtualDirectory | fl identity,internalurl, externalurl
get-ClientAccessServer | fl identity,AutodiscoverServiceInternalUri
get-webservicesvirtualdirectory | fl identity,internalurl,externalurl
get-oabvirtualdirectory | fl identity,internalurl,externalurl
get-owavirtualdirectory | fl identity,internalurl,externalurl
get-ecpvirtualdirectory | fl identity,internalurl,externalurl
get-ActiveSyncVirtualDirectory | fl identity,internalurl,externalurl

Reference : http://www.seanlabrie.com/2011/script-to-set-internal-and-external-urls-on-all-of-your-exchange-virtual-directories-at-once/

Windows 7 Fresh Install unable to install Windows Update (Not Updating / Stuck)

Hi,

I will not take the credit for this, but it’s happen several time to me windows New HP Tower / Laptop with Windows 7 Pro 64 bits.

Thanks for SpiceWorks Community

https://community.spiceworks.com/how_to/132158-get-windows-7-updates-working-after-a-fresh-install

 

Make sure you have SP1 installed

Most people have media with SP1 already in it, but if yours is older it may not be included. If not, install it before anything else.

https://support.microsoft.com/en-us/help/15090/windows-7-install-service-pack-1-sp1

2

Install IE11

Some of the MS pages don’t work correctly with older versions of IE so getting IE11 installed first is a good idea.

https://support.microsoft.com/en-us/help/18520/download-internet-explorer-11-offline-installer

3

Install KB3050265

This seems to be the key to everything. Windows Updates and many later manual updates will just spin for hours on end until this one is installed.

https://support.microsoft.com/en-us/kb/3050265

4

Install the Windows 7 rollup

This is the closest to SP2 that we’ll ever see for Windows 7. It includes most updates released after SP1 up until April 2016. It’s much faster than downloading and installing all of them individually via Windows Updates.

https://support.microsoft.com/en-us/kb/3125574

NOTE: Read the Prerequisites section in the link. You will probably need to install “April 2015 servicing stack update for Windows 7 and Windows Server 2008 R2 (KB3020369).” KB3020369 may not require a reboot. Reboot anyway!

5

Install July 2016 update rollup

NOTE – adding this step 10/26/16 after reports that it helps move things along.

Install the July 2016 update rollup for Windows 7 SP1 and Windows Server 2008 R2 SP1:

https://support.microsoft.com/en-us/kb/3172605

 

Moving EC2 Instance from one account to another

When you move the EC2 instance from one account to another you can follow this procedure it’s working fine, except for one details.

https://aws.amazon.com/premiumsupport/knowledge-center/account-transfer-ec2-instance/

After Creating the snapshot, when you log into the target location and you try to create an Instance from the AMI, you need to be in the same region as the source to access the snapshot.

To validate your region look at the top right corner, on the right of you account Name the region is there. Be Sure the Region is the same for the source and the destination!

Polycom – VoIP – Asterix – Sonicwall – Cisco Swiches – Phones unRegistered or disconnected

Hi,

Troubleshooting note for a situation (a brand new installation) but the VoIP phone got disconnected randomly.

Equipments :

  • Phone Polycom
  • PBX : asterisk
  • Switches : Cisco SG-300
  • Sonicwall Soho (TZ Series)

Let’s start with the switch. Cisco have a feature enabled by default called : “Green Ethernet” if you have a non managed switch. Simply : Trash it. Purchase a switch : Netgear GS105E-200NAS

For Managed switch, there’s a more simple solution, turn off the Green Ethernet and the 802.3 Energy Saving

Sg300

Sonicwall

In the Firewall Rules, OpenUP the port : 5000 up to 5500 UDP, 10000-20000 UDP and TCP – Any to Any (Incoming)

In the VoIP Section :

Check Enable Consistent Nat and Check Enable SIP Transformation and 

VoIPSonic

The MOST IMPORTANT is this setting :

Disable the DPI Setting :

In the Firewall, Advanced, Connections switch the option to Maximum SPI connection (DPI Services Disabled)

DPI

After those changes you need to Reboot the Sonicwall appliance.

Monitor the phones and they should stay connected “forever”.

JF

 

Create IPSEC VPN Sonicwall Tunnel Amazon Web Service (AWS) VPC – No Traffic No Ping…. How to fix it.

Hi,

If you are like me and you want to deploy a Sonicwall and create a Private VPN between your Network and Amazon Web Service.. This can give you an hard time and you to understand the Sonicwall / Amazon to get this working. Dell Create a procedure for that, first link on Google and to be honest… 75% is working…

http://support-public.cfm.software.dell.com/27707_configuring_sonicos_for_amazon_vpc_technote.pdf

This is an Update Version of this Procedure, I will add some screen shot a bit Later On.. But if you have Knowledge in VPN and Sonicwall This might give you the part missing.

My first attempt The VPN was setup but no traffic in between..

Important Information:

Sonicwall

  • For the BGP (Dynamic Routing) even if your Sonicwall support it in the Specs…You need a Sonicwall License Upgrade call SonicOS Expanded…  Good News. The Static Will Work!
  • Tested with Sonic OS 6.2+

Amazon Site.

Go to VPC

Steps :

  • 1. Initializing the VPC (You can use the default)
  • 2. Creating the Subnet (You can use the default)
  • 3. Creating the Virtual Private Gateway
  • 4. Attaching the Virtual Private Gateway to the VPC
  • 5. Creating a Customer Gateway
  • 6. Create the VPN Connections
  • 7. Define the Route Tables

1 – Initializing the VPC (VPC it’s the Private Cloud- I can compare it to a router)

If you have no VPC, Create One and assigned a VPC CIDR (IP Range like : 10.1.0.0/16)

2 – Creating the Subnet (Network Range visible to the EC2 Instance and also the private Network accessible over the VPN)

Create a Subnet attached to your VPN like 10.1.1.0/24

3 – Creating the Virtual Private Gateway

Create a Virtual Private Gateway (This is the “Amazon side of the VPN”)

4 – Attaching the Virtual Private Gateway to the VPC

(Select the VPG) and attach to VPC

5 – Creating a Customer Gateway

The Customer Gateway it’s the Sonicwall Specs.

  • Name Tag (A Friendly name to define the service)
  • Routing (Static)
  • IP Address : The WAN IP of the Sonicwall

6 – Create the VPN Connections

VPN Connections – Create

  • NameTag (A Friendly name to define the service)
  • Virtual Private Gateway (The one Created at Step 3)
  • Customer Gateway (The one Created at Step 5)
  • Routing Options (Choose Static)
  • Static IP Prefixes it’s your LAN NETWORK ( 192.168.10.0/24)

Download the configuration File in the Format : Generic / Generic / Vendor Agnostic *** KEEP IT FOR FUTUR STEPS

7 – Go to Route Table

Select the Route available – Click on Route and Edit the following :

Add 2 routes :

Destination : 0.0.0.0 / 0      Target : Virtual Private Gateway (it’s Amazon ID – Steps 3)

Destination : 192.168.10.0 / 24 (YOUR LAN NETWORK) Target : Virtual Private Gateway (it’s Amazon ID – Steps 3)

GoTo Route Propagation Tab and Edit and Set Propagate to Yes

Save

NOW SONICWALL! **** I WILL SHOW IT ONLY FOR ONE TUNNEL THE FAILOVER IT’S THE SAME

Open the Text File you Downloaded at Steps 6.

The important Information it’s under : IPSec Tunnel #1

Go to VPN :

  • Add…
  • General : 
  • Policy Type : Tunnel Interface
  • Name : Friendly Name Me : AWS VPN
  • IPSec Primary Gateway Name (Take the Outside IP Addresses– Virtual Private Gateway)
  • Shared Secret (In the Text File : Pre-Shared Key)
  • Local IKE ID: (Take the Outside IP Addresses– Customer Gateway)
  • Peer IKE ID: (Take the Outside IP Addresses– Virtual Private Gateway)
  • Proposals : (Double check the spec in the Text Files)
  • Phase 1
  • Exchange : Main Mode
  • DH Group : Group 2
  • Encryption : AES-128
  • Authentication : SHA1
  • Life Time : 28800
  • Phase 2
  • Protocol : ESP
  • Encryption : AES-128
  • Authentication SHA1
  • Check the Check Box Enable Perfect Foward Secrecy
  • DH Group : Group 2
  • Life time : 28800
  • Advanced
  • Check Enable Keep Alive
  • VPN Policy Bound to : Interface X1

Clic OK at this point you should have within couple of seconds the VPN UP.. but the trouble begin 🙂

Go to the Menu VPN / Advanced

  • UnCheck : Enable NAT Traversal

Go to the Menu Network / Interfaces

Add Interface (Zone VPN)

  • VPN policy Select : AWS VPN
  • Name : AWSVPN
  • Static Ip Mode
  • IP Address : In the Text Files : (Inside IP Addresses – Customer Gateway) This can be 169.254.x.x
  • Subnet Mark : In the Text Files : (Inside IP Addresses – Customer Gateway) This can be 255.255.255.252
  • Add This.

Go to the Menu Network / Routing

Under Route Policies

  • Add
  • Source : Lan Subnets
  • Destination : Create a New Object
    • Name : AWSNetwork
    • Zone Assignement : VPN
    • Type : Network
    • Network : The VPC CIDR CREATED AT STEP 1 (10.1.0.0/16)
  • Service : ANY
  • Interface :  AWSVPN (The only created at the previous step)
  • Metric : 1

Go to Menu Firewal / Access Rules

from VPN to LAN

Add :

  • from : VPN
  • to : LAN
  • Source Port : Any
  • Service : Any
  • Sources : AWSNetwork (Created at the previous steps)
  • Destination : Any
  • Always On

OK

*** Create the Reverse now :

from LAN to VPN

Add :

  • from : LAN
  • to : VPN
  • Source Port : Any
  • Service : Any
  • Sources : Any
  • Destination : AWSNetwork (Created at the previous steps)
  • Always On

OK

NOW THE EC2 Instance :

Network and Security

  • Security Groups (Select the group, go to inbound tab then EDIT)
    • Add Rules
      • All traffic
      • Protocol : All
      • Port Range : 0 – 65535
      • Source : Custom IP
      • Your LAN : 192.168.10.0/24

*** BE SURE YOUR SECURITY GROUP IS ASSIGN PROPERLY TO YOUR EC2

EC2 :

select one of your instance :

Action / Manage Private IP

Set a Private IP from the RANGE you Define in Step 2 (Subnet).

ex :  10.1.1.1

From your Network test the ping : 10.1.1.1

You Should have an answer!

 

 

 

 

Error publishing web site

Environment: Visual Studio 2013

Situtation: Trying to publish a website with pre-compile option ON.

Error:
Attempt by security transparent method ‘System.Web.WebPages.Administration.SiteAdmin.RegisterAdminModule()’ to access security critical method ‘System.Web.WebPages.ApplicationPart..ctor(System.Reflection.Assembly, System.String)’ failed..

Solution:
Delete reference to System.Web.Administration (select it in References folder and press Del)

Note: This error can also happen when launching your website if you published with the option pre-compile set to OFF.