How to Adjust Outlook Web App(OWA) session timeout

  • You can find office 365 services session timeout from here.
  • The requirement of reducing or increasing O365 OWA session time out is depending on your organization security requirement. you are comply with PCIDSS or ISO standard this would be ideal solution. lets do it now
    1. Connect to Exchange Online using PowerShell

$UserCredential = Get-Credential

  • enter your O365 portal admin credentials
  • Create and import a new PowerShell Session

https://gist.github.com/sachindra88/9d84522de60f4d63b858a2078bf362f4.js

  • For more details concerning connecting to Exchange Online see here.
  • Adjust ActivityBasedAuthenticationTimeoutInterval by executing the following command
  • This will execute the time out session to one (1) hour

https://gist.github.com/sachindra88/abed31b64cd3540cc5efea102ad1f6b5.js

  • To verify the configuration execute the following command.

https://gist.github.com/sachindra88/311d4a6cc622a5e4937f860b152120dd.js

 

Azure SQL Database – Failed to Export Delete Database

We receive a request from different department to export/delete database. but the error message throwing that “Failed to delete the database: TestDB. ErrorCode: 400 ErrorMessage: Database ‘TestDB’ cannot be deleted because it is used as a sync metadata database which still contains sync groups and/or sync agents”


We have no idea what was happen to this database since we haven’t touch that. what really happen we don’t know is some one setup a data sync group where this database was involved in bi-directional synchronization with another Azure SQL Database. The other database was deleted a long time ago and clicking on the sync option within the portal confirmed that nothing was actually ever connected or ready.



error

I found many internet articles to resolve this issue. we found one useful is remove unwanted table schema(DSS) and users(MS_SyncAccount).

but fortunately we found one single script to do that all. I would like to thanks Microsoft support to given this.
steps.
1. run this code in to affected database

https://gist.github.com/sachindra88/834a887aa664decaa2d8e43339aebbe4.js2. click the result raw



3. in result view you can find all the script which need to execute as per below image



4. execute the script on affected database



Thank you and your comment appreciated.

Install Configure cPanel and WHM in Azure

cPanel is an online Linux-based web hosting control panel that provides a graphical interface and automation tools designed to simplify the process of hosting a web site. cPanel utilizes a three-tier structure that provides capabilities for administrators, resellers, and end-user website owners to control the various aspects of website and server administration through a standard web browser.

In this article I will describe how to install  and configure Cpanal/WHM in your Azure environment. I will use Centos 7.4 server to host CPanal/WHM

Installation Requirements

  • Create Azure VM with standard D2s V3 (2 vcpu ,  8 GB memory)
  • Azure public IP
  • A clean fresh minimal installation of CentOS 7.4 server.  
  • DNS name setup for Azure VM

Before we proceed to the installation section, you must note these to important points:

  • Once you have installed cPanel/WHM, it can’t be removed from your system. You will have to reinstall your the operating system to remove it.
  • cPanel is commercial software and requires a licence to work, however, there is a 15 day trial (which is automatically activated once you install cPanel), you can install your software using the trial then purchase the software later.

Azure VM installed CentOS 7.4

configure public IP address for the Azure VM

set added hostname in to Centos server
hostnamectl set-hostname webxxxxxx.westus2.cloudapp.azure.com

to set the hostname in azure VM you should reset root password first
passwd root
>> enter new root password

yum install perl
yum install curl
To run cpanal installation you should disable Network Manager

systemctl stop NetworkManager.service
systemctl disable NetworkManager.service
Change to the /etc/sysconfig/network-scripts directory.
Open the ifcfg-eth0 and ifcfg-lo files with your preferred text editor and, if they exist, set the following keys’ values:
NM_CONTROLLED=no
ONBOOT=yes
Now restart the network
systemctl restart Network.service
run the cpanal installation

sh latest

Installation Start

Before you configure your server, ensure that your firewall allows access on port 2087.
After ensuring that your firewall allows access on port 2087, you can configure your server.
Add firewall rules in Azure Application Security Group
login using root credentials

Finally you can see CPanal dashboard

AzCopy stuck? No progress? Add the correct parameter to AzCopy

Recently I have face an issue with Azure AzCopy upload to blob. My AzCopy command is worked and while uploading data to blob storage, it was stuck and no more progress shown in the power shell or log file.

before use AzCopy you should read full Microsoft AzCopy documentation related to upload data from windows. https://docs.microsoft.com/en-us/azure/storage/common/storage-use-azcopy

while uploading multiple files in to blob storage AzCopy will prompt confirmations. but it wont show in your power shell screen.

this could be the reason of stuck your upload.

the solution is /Y parameter

.\AZCopy.exe /Source:$path /Dest:$BlobServiceEndpoint$ContainerName/$name /DestKey:$BlobAccessKey  /Z:restart.log  /S /XO /Y /V:azcopyupload.log

this will suppresses all AzCopy confirmation prompts

here I upload my customized command for uploading one by one folder to my blog container

$SourceDirPath = Read-Host -Prompt ‘Insert Source Directory Path (Fully Qualified Directory Path)’
$BlobServiceEndpoint = Read-Host -Prompt ‘Insert Primary Blob Service Endpoint (Available in Storage account properties)’
$BlobAccessKey = Read-Host -Prompt ‘Insert Blob Access Key’
$ContainerName = Read-Host -Prompt ‘Insert Container Name (Container will be created if do not exist)’
$CompanyFolderName = Read-Host -Prompt ‘Insert Company Folder Name to upload files belong to single company(Leave this blank to upload all files)’
$directories = Get-ChildItem -Path $SourceDirPath
Write-Output $directories;
Foreach($directory in $directories)
{
    $name = $directory.Name
    if([string]::IsNullOrEmpty($CompanyFolderName) -or $name.ToLower() -contains $CompanyFolderName.ToLower())
    {
        if(-not ([string]::IsNullOrEmpty($name)))
        {
            Write-Output ‘Uploading company files: ‘ + $CompanyFolderName;
        }
    $name = $name -replace ‘[.,_]’,’-‘
    $name = $name.ToLower()
    $path = $directory.FullName
    Write-Output $name;
    Write-Output $path;
        .\AZCopy.exe /Source:$path /Dest:$BlobServiceEndpoint$ContainerName/$name /DestKey:$BlobAccessKey  /Z:restart.log  /S /XO /Y /V:azcopyupload.log
    }
}

Winmail.dat File Receive Lotus Domino users

We appear to have found the solution – which I’m posting here to (hopefully) save some other poor b*stard from having to wade through weeks of poor documentation, support calls and forum posts.
The problem: Some email recipients on Mac OS X using Apple Mail and Gmail receive winmail.dat attachments in place of correctly-encoded MIME attachments from users running Outlook 2016/Windows 10/Office 365 hosted mail. They can’t open the faulty attachments and (in our case) the result is grumpy clients.
The cause: The issue is that Exchange can still encode attachments as RTF rather than MIME. There’s no need for this in a hosted SaaS email service in 2016 – it’s a legacy piece of Exchange functionality that’s probably kept around in the code-base for reasons known only to Microsoft. But it’s definitely a pain in the neck for those of us who don’t need backwards-compatibility to dinosaur-era Exchange servers.
The solution: You’ll undoubtedly come across various articles and suggestions that you need to indulge in a whole bunch of PowerShell jiu jitsu in order to fix the problem. In our case this didn’t work – or at least not for any length of time. Thankfully, there is an (apparent) fix lurking in the Office 365 Admin GUI. It goes like this:
  1. Login to your Office 365 Portal (portal.office.com) using your Admin credentials.
  2. Click the Admin icon.
  3. Flip down the Admin sub-menu from the left-hand menu, and click Exchange. This will take you to your hosted Exchange admin page.
  4. Click Mail Flow from the left hand menu.
  5. Click Remote Domains from the top menu line. This will allow you to configure a specific set of rules for the offending recipient domains.
  6. Click the Plus icon above the name field. This brings up a separate page that allows you to start the process of configuring the rules for the recipient domain(s).
  7. Give the configuration a suitable name for the rule you’re adding.
  8. Add the fully-qualified domain name for the recipient that’s having the problem with the winmail.dat attachments. As far as I can tell, the configuration should support wildcards – YMMV.
  9. About two-thirds of the way down the page, you’ll find the “use rich text” setting – it will default to “Follow user settings”. Change this to “Never”.
  10. For extra credit, you can change the default MIME encodings to Unicode (UTF-8) instead of Western (ISO), as in my experience it seems to transition through foreign mail servers better – but again, YMMV.
  11. Hit the Save button.
Of course, you’ll need to add each domain individually if you have lots of recipients with the winmail.dat problem. The obvious fix is to use the “default” rule to set “use rich text” to “Never” – although in our case our Exchange instance already had this setting, but the problem persisted. Go figure.
In my view, the likely cause is that the Office 365 Exchange instance isn’t respecting the encoding preferences in the Outlook 2016 client – in which case it’s a Microsoft bug. Feel free to fix it, guys.
Hope this helps someone.
Cheers… Sachin
Go to Mail Flow in Exchange admin center
Go to Remote domain and click Default parameter 
Execute step 9 as highlighted and save
This will solve all the winmail.dat problems
Copy from Tech-net and re-post with my screenshot for your reference Link : https://social.technet.microsoft.com/Forums/ie/en-US/de144371-4989-42a5-b8a4-3ff19c475ee1/winmaildat-rears-its-ugly-head-office-365outlook-2016win10?forum=outlook

Your hyper-v virtual machine IP disappear? [solved]

we had a big problem in our company Hyper-V servers virtual machine restart and suddenly IP’s disappear.
here is the solution i found from technet. do the hardening for all virtual machine deployed in Hyper-V

To fix it, enter this from Command Prompt:
C:\Users\Administrator> netsh interface ipv4 show inter     

result as:

Idx Met MTU State Name
—  ———-  ———-  ————  —————————
 1          50  4294967295  connected     Loopback Pseudo-Interface 1
11          10        1500  connected     Local Area Connection     

11: <=Keep it in mind

Next run this command:
             C:\Users\Administrator>netsh interface ipv4 set interface 11 dadtransmits=0 store=persistent     

Next, enter
Run > services.msc > disable DHCP Client service

Final, restart your server.

Good Luck.

This solution is posted by Mr lyngtinh and its works for me. Hopes it work for you 🙂

How To Fix BOOTMGR Is Compressed Error Message

bootmgr is compressed 
Windows 7

Boot into the System Recovery Options using the preinstalled Advanced Boot Options or a Vista/7 installation/recovery DVD – see the illustrated tutorial at Sevenforums for instructions if required.

  • Select ‘Startup Repair’ and wait until the repair attempt completes. If successful you can then restart the computer and Windows may boot up normally.

If the repairs fail and/or the computer does not restart into Windows normally, proceed as follows.

  • Boot into the System Recovery Options again but this time select ‘Command Prompt’ instead of startup repair – this will take you to a windows command prompt.

[Note: if using RAID for multiple hard drives you may not see your version of Windows listed in System Recovery Options, during the loading of the recovery process. In this case you would need to press ‘Load Drivers’ and browse to your RAID drivers so that your version of Windows can be listed]

  • Type bootrec /fixmbr and press Enter. Press Y to proceed
  • Type bootrec /fixboot and press Enter. Press Y to proceed
  • Type bootrec /rebuildbcd and press Enter. Press Y to proceed
  • Type Exit and press Enter to restart the computer.

The BOOTMGR is compressed error message should not appear and Windows should boot normally.

this is work for me…

Add static route in Smoothwall firewall

1) go to path /etc/rc.d
    type : vi rc.netaddress.up

2) press insert button

3)add -net destination netmask subnetmask gw gateway dev deviceinterface

Ex:  add route: route add -net 10.9.XXX.XX netmask 255.255.255.0 gw 192.168.X.XX eth1

Have a nice day…..!!!


 

Quickly Find Used IP Addresses

Open Command Prompt and type:

FOR /L %i IN (1,1,254) DO ping -n 1 192.168.0.%i | FIND /i "Reply">> c:\ipaddresses.txt

The “-n 1” is for only 1 ping packet to be sent to each computer.
Change 192.168.0 to match you own Network ID.
This will ping all IP addresses on the 192.168.0.0 network segment and create a text file called IPADDRESSES.TXT in C:\, where it will list only the IP addresses that gave a reply.