Friday, March 26, 2021

How to Update Office 365 Groups Primary Email Address

How to Update Office 365 Groups Primary

 Email Address


How to Update the primary SMTP address of Office 365 Groups.

To do this, we must use PowerShell as it is not possible to change the email address of such group using the EAC.

First, we connect to Exchange Online PowerShell, and then we need to use the *-UnifiedGroup cmdlet.

To retrieve the list of groups that need to be updated, we use the following code:

Get-UnifiedGroup -ResultSize Unlimited | Where {$_.PrimarySmtpAddress -like "*tenantname.onmicrosoft.com"}


To update the primary SMTP address of an Office 365 Group, we use the Set-UnifiedGroup cmdlet with the PrimarySmtpAddress parameter:

Set-UnifiedGroup “Test Group” -PrimarySmtpAddress “test.group@nunomota.pt”

 

For E.g.

1.  Run the below command to add required SMTP address as an alias.

Set-UnifiedGroup -Identity "X" -EmailAddresses: @{Add ="Y"}

here X is the Display Name of Office 365 group and Y is the required Email ID.

Set-UnifiedGroup -Identity Test o365Group" -EmailAddresses: @{Add ="test.o365group@abcd.com"}

2. Promote alias as a primary SMTP address,

Set-UnifiedGroup -Identity "Test O365Group" -PrimarySmtpAddress "test.o365group@abcd.com"

3. If not required, you can remove first ID using below command.

Set-UnifiedGroup -Identity "Test o365Group" -EmailAddresses: @{Remove="test.o365group@abcd.onmicrosoft.com"}

Friday, March 5, 2021

PowerShell Code: Find Users with Email Address From a Specific Domain

Searching Email addresses with a specific domain name suffix Using PowerShell | Office 365 


Find Users with Email Address From a Specific Domain


Get-Mailbox -ResultSize Unlimited | Where-Object {($_.EmailAddresses -like "*@YourDomain.Com*")}


Command may take long to run as it will run on your Tenant completely. 

Use | Export-CSV Command to extract the output to the CSV File. 

How to use mailbox audit logs in Office 365

Summary

In Microsoft Office 365, you can run mailbox audit logs to determine when a mailbox was updated unexpectedly or whether items are missing from a mailbox. You may have to do this, for example, if items are moved or if they're deleted unexpectedly or incorrectly.

For the vNext environment, please note that mailbox audit logs are not enabled by default and need to be turned on for a user before beginning a search

How to run and check mailbox audit logs

Mailbox audit logging lets users obtain information about actions that are performed by non-owners and administrators. Mailbox audit logging is available to members of the Audit Reporting Mailbox self-service group only by using Windows Remote PowerShell.


Step 1: Run the script

To run the script, follow these steps:

  1. Start Notepad, and then copy the following code into the file. The code uses the search-mailboxAuditLog command that is part of Microsoft Exchange Server.

Copy Below: 

param ([PARAMETER(Mandatory=$TRUE,ValueFromPipeline=$FALSE)]
[string]$Mailbox,
[PARAMETER(Mandatory=$TRUE,ValueFromPipeline=$FALSE)]
[string]$StartDate,
[PARAMETER(Mandatory=$TRUE,ValueFromPipeline=$FALSE)]
[string]$EndDate,
[PARAMETER(Mandatory=$FALSE,ValueFromPipeline=$FALSE)]
[string]$Subject,
[PARAMETER(Mandatory=$False,ValueFromPipeline=$FALSE)]
[switch]$IncludeFolderBind,
[PARAMETER(Mandatory=$False,ValueFromPipeline=$FALSE)]
[switch]$ReturnObject)
BEGIN {
  [string[]]$LogParameters = @('Operation', 'LogonUserDisplayName', 'LastAccessed', 'DestFolderPathName', 'FolderPathName', 'ClientInfoString', 'ClientIPAddress', 'ClientMachineName', 'ClientProcessName', 'ClientVersion', 'LogonType', 'MailboxResolvedOwnerName', 'OperationResult')
  }
  END {
    if ($ReturnObject)
    {return $SearchResults}
    elseif ($SearchResults.count -gt 0)
    {
    $Date = get-date -Format yyMMdd_HHmmss
    $OutFileName = "AuditLogResults$Date.csv"
    write-host
    write-host -fore green "Posting results to file: $OutfileName"
    $SearchResults | export-csv $OutFileName -notypeinformation -encoding UTF8
    }
    }
    PROCESS
    {
    write-host -fore green 'Searching Mailbox Audit Logs...'
    $SearchResults = @(search-mailboxAuditLog $Mailbox -StartDate $StartDate -EndDate $EndDate -LogonTypes Owner, Admin, Delegate -ShowDetails -resultsize 50000)
    write-host -fore green '$($SearchREsults.Count) Total entries Found'
    if (-not $IncludeFolderBind)
    {
    write-host -fore green 'Removing FolderBind operations.'
    $SearchResults = @($SearchResults | ? {$_.Operation -notlike 'FolderBind'})
    write-host -fore green 'Filtered to $($SearchREsults.Count) Entries'
    }
    $SearchResults = @($SearchResults | select ($LogParameters + @{Name='Subject';e={if (($_.SourceItems.Count -eq 0) -or ($_.SourceItems.Count -eq $null)){$_.ItemSubject} else {($_.SourceItems[0].SourceItemSubject).TrimStart(' ')}}},
    @{Name='CrossMailboxOp';e={if (@('SendAs','Create','Update') -contains $_.Operation) {'N/A'} else {$_.CrossMailboxOperation}}}))
    $LogParameters = @('Subject') + $LogParameters + @('CrossMailboxOp')
    If ($Subject -ne '' -and $Subject -ne $null)
    {
    write-host -fore green 'Searching for Subject: $Subject'
    $SearchResults = @($SearchResults | ? {$_.Subject -match $Subject -or $_.Subject -eq $Subject})
    write-host -fore green 'Filtered to $($SearchREsults.Count) Entries'
    }
    $SearchResults = @($SearchResults | select $LogParameters)
    }
  1. On the File menu, click Save As.

  2. In the Save as type box, click All File.

  3. In the File name box, type Run-MailboxAuditLogSearcher.ps1, and then click Save.

  4. Start Windows PowerShell, and then connect to Windows Remote PowerShell.

  5. Locate the directory in which you saved the script, and then run the script.

 Note

  • If you run the script without parameters, you will be prompted for the following default parameters:
    • Mailbox
    • StartDate
    • EndDate
  • To search for entries from the current day, add one day to the end-date value in the prompt window. For example, if the current date is 3/14/2017, and you want to include the current day in your search, enter 4/15/2017  as the end date.

Thursday, March 4, 2021

Remote Server returned '550 5.7.520 Access denied, Your organization does not allow external forwarding

Delivery has failed to these recipients or groups:

Your message wasn't delivered because the recipient's email provider rejected it.

Remote Server returned '550 5.7.520 Access denied, Your organization does not allow external forwarding. Please contact your administrator for further assistance. AS(7555)


If you have received above error recently in an NDR, Check below settings and make changes as suggested to start the mail flow as usual. 


What caused it: Oct 2020: MC221119: Office 365 ATP External email forwarding controls and policy change


Above Policy Changes your Rules for automatic external forwarding in your Outbound Spam Filter Policy.


Which is by default set to AUTOMATIC - That blocks automatic external forwarding
  • Automatic: Automatic external forwarding is blocked. Internal automatic forwarding of messages will continue to work. This is the default setting.

  • On: Automatic external forwarding is allowed and not restricted.
  • Off: Automatic external forwarding is disabled and will result in a non-delivery report (also known as an NDR or bounce message) to the sender.
In order to fix this issue, change your Policy from AUTOMATIC to ON. 

Changing policy setting to ON will allow Automatic External Forwarding that is been set on your Email Addresses inside your O365 Tenant.

Monday, February 15, 2021

Microsoft-Windows-GroupPolicy Event ID 1006 / 49

Microsoft-Windows-GroupPolicy Event ID 1006 .

ErrorCode 49. ... Error code 49 (Invalid credentials)


Sure fix of this issue is to check your HOST File entry in c:\windows\system32\drivers\etc

Cause: cluttered host file & entries of AD DC in it also check for Server IP Entry

Resolution: Remove AD DC Entries from HOST FILE & run GPUPDATE - Issue Fixed

Log Name: System
Source: Microsoft-Windows-GroupPolicy
Date: 12/01/2011 11:51:40 AM
Event ID: 1006
Task Category: None
Level: Error
Keywords:
User: SYSTEM
Computer: server.local
Description:
The processing of Group Policy failed. Windows could not authenticate to the Active Directory service on a domain controller. (LDAP Bind function call failed). Look in the details tab for error code and description.




Friday, December 11, 2020

How to Create a Click to Call Link Using HTML and in WordPress

 
How to Create a Click to Call Link Using HTML and in WordPress

How to Make a Clickable Phone Number With HTML

1. Start with a standard link tag:

<a href=""></a>

2. Enter your phone number with no dashes in the quotes:

<a href="5554280940"></a>

3. Now the important part, add tel: to the beginning of the number:

<a href="tel:5554280940"></a>

4. Then finish it up with some text for the link

<a href="tel:5554280940">Call us at 555-428-0940</a>

Here’s what you should see:

Call us at 555-428-0940

Click the link to make sure it works. If the call goes through, you’re done.

Thursday, October 15, 2020

How to Fix Briefly Unavailable for Scheduled Maintenance Error in WordPress

How to Fix Briefly Unavailable for Scheduled Maintenance Error in WordPress

 

Are you seeing the ‘Briefly unavailable for scheduled maintenance’ error in WordPress? This error usually appears while updating WordPress core, plugins, or themes.

Basically, your WordPress site fails to finish the update which leaves you stuck in the maintenance mode.

In this article, we will show you how to easily fix the “Briefly unavailable for scheduled maintenance” error in WordPress. We will also show you why this error occurs and how you can avoid it in the future.


Why Does The WordPress Maintenance Mode Error Occur?

Maintenance mode page is technically not an error. It is a notification page.

During the update process, WordPress downloads necessary update files to your server, extract them and then install the update.

WordPress also puts your site on maintenance mode and displays the “Briefly unavailable for scheduled maintenance. Check back in a minute.” notice during the process.


To trigger the maintenance mode notification, WordPress creates a temporary .maintenance file in your website’s root folder.

If everything works normally, then this notice will probably be displayed for only a few seconds. After the successful update, WordPress will automatically delete the maintenance file to disable maintenance mode.

However, sometimes due to a slow WordPress hosting server response or low memory issue, the update script will timeout thus interrupting the process. When this happens, WordPress does not get a chance to take your site out of maintenance mode.

In other words, your site will continue showing the maintenance mode notice, and you will need to manually fix it.

How to Fix WordPress Maintenance Mode Error?

To get your website out of maintenance mode, all you really need to do is delete the .maintenance file from your site’s root folder using FTP.

To trigger the maintenance mode notification, WordPress creates a temporary .maintenance file in your website’s root folder.

If everything works normally, then this notice will probably be displayed for only a few seconds. After the successful update, WordPress will automatically delete the maintenance file to disable maintenance mode.

However, sometimes due to a slow WordPress hosting server response or low memory issue, the update script will timeout thus interrupting the process. When this happens, WordPress does not get a chance to take your site out of maintenance mode.

In other words, your site will continue showing the maintenance mode notice, and you will need to manually fix it.

How to Fix WordPress Maintenance Mode Error?

To get your website out of maintenance mode, all you really need to do is delete the .maintenance file from your site’s root folder using FTP.


If you can’t find the .maintenance file in your WordPress root directory, then make sure you checked your FTP client to show hidden files.

In Filezilla, you can force it to show hidden files by clicking on Server » Force showing hidden files from the menu bar.


Once the .maintenance file is removed, your site will come out of maintenance mode, and the error should be fixed.

If you don’t know how to use FTP, then you can also remove the files by going to the file manager in your WordPress hosting control panel, and then deleting the .maintenance file inside the file manager.

How to Avoid WordPress Maintenance Mode in the Future?

We already know that the “Briefly unavailable for scheduled maintenance” error is caused by slow server response or low memory issue on your web hosting server.

The easiest way to avoid this error is by upgrading to a higher hosting plan. We recommend going with one of these managed WordPress hosting companies that offer superior hosting performance.

If upgrading to a higher hosting plan is not an option, then we recommend doing plugin and theme updates one at a time.

Often users have a tendency of quickly clicking on the update link underneath each plugin. WordPress then staggers the update order, but even a millisecond of delay in connection could cause a conflict leading your site to be stuck in maintenance mode.


Instead of quickly clicking on the Update link, we recommend patiently updating one plugin at a time.

Friday, September 25, 2020

How to Update Windows Core Servers

 Installing updates on Windows Server 2008/2012/R2 Core


What is Server Core Installation in Windows? or Core Server in Windows?

A Server Core installation does not include the traditional full graphical user interface

A Server Core installation provides a minimal environment for running specific server roles, which reduces the maintenance and management requirements and the attack surface for those server roles.

Server Core installation option installs only the subset of the binary files that are required by the supported server roles. For example, the Explorer shell is not installed as part of a Server Core installation. Instead, the default user interface for a server running a Server Core installation is the command prompt

Now Let's See how to Install Updates on Core Server

By typing sconfig in the command prompt it will open the menu where you can do a lot of server configurations.



Right now we are interested to just update the server, so press 6 then Enter.




This will open another window where you need to chose what type of updates you want the tool to check for. If you want to check only for recommended updates go ahead and press R, but I I usually go for all. It’s up to you.




Checking for updates will take a few minutes and at the end you will be presented will all the available updates that apply to the server. Also, you can choose to revoke the operation and not install any updates, install just a single one or install all.


After all the updates were installed you will be asked to reboot the server, so click Yes on the message box button to do so. And that’s it ! Server is patched.


Now to confirm all updates are installed run below command. 

Run - wmic qfe list

Read More: 

Benefits of a Server Core installation

The Server Core installation option provides the following benefits:

  • Reduced maintenance: Because the Server Core installation option installs only what is required to have a manageable server for the AD DS, AD LDS, DHCP Server, DNS Server, File Services, Print Services, and Streaming Media Services roles, less maintenance is required than a full Windows Server installation with a graphical interface.
  • Reduced attack surface: Because Server Core installations are minimal, there are fewer applications running on the server, which decreases the attack surface.
  • Reduced management: Because fewer applications and services are installed on a server running the Server Core installation, there is less to manage.
  • Less disk space required: A Server Core installation requires only about 1 GB of disk space to install and approximately 2 GB for operations after the installation.

Known issues for deploying a Server Core installation

  • Server Core installations are only intended to run server roles and cannot be used to run applications such as a Microsoft Office suite or any other applications that depend on a graphical user interface.
  • There is no way to upgrade from a previous version of the Windows Server operating system to a Server Core installation. Only a clean installation is supported.

Windows Administrator Level 1 Interview Question & Answers

 Windows Administrator Level 1 Interview Question & Answers What is an active directory?  An Active Directory (AD) is a directory ...