I have an existing site where its menu showing on left navigation with search box. Here I want to keep the menu bar on the left side but search box on top of the page as below:

enter image description here

In above screenshot the search box is showing with menus on the left hand side. I want to shift this top of the page as like below.

Anybody can please help with this what workaround I need to apply on the existing site?

enter image description here

1 Answer 1


Try running below PowerShell script:

$userName = "user@tenant.onmicrosoft.com"
$passWord = "YourSPOPassword"
$encPassWord = convertto-securestring -String $passWord -AsPlainText -Force
$cred = new-object -typename System.Management.Automation.PSCredential -argumentlist $userName, $encPassWord
Connect-PnPOnline -Url "https://yourtenant-admin.sharepoint.com/" -Credentials $cred
#Example as below:
Connect-PnPOnline -Url "https://yourtenant-admin.sharepoint.com/" -Credentials $cred
    $web = Get-PnPWeb
    #0 - Inherit, #1 - AllPages, #2 - ModernOnly, #3 - Hidden enums for Global (Modern Search)
    Write-Host "The changes have been updated successfully." -BackgroundColor Green
    $ErrorMessage = $_.Exception.Message +"in applying search setting changes!: "
    Write-Host $ErrorMessage -BackgroundColor Red
    Write-Log $ErrorMessage
Write-Host "The script execution has been completed successfully."

Source: Configure SharePoint search box in office 365 suite bar step by step

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.