Monday, September 6, 2021

Create Headerless search result plage



#1)Create a page with normal layout in SharePoint
Connect-PnPOnline https://shared.sharepoint.com/sites/IT
Get-PnPClientSidePage -Identity results
Set-PnPClientSidePage -Identity results -LayoutType HeaderlessSearchResults

Saturday, September 4, 2021

Get the office 365 Compliance report

Install-Module -Name ExchangeOnlineManagement
Import-Module ExchangeOnlineManagement

$Credential = Get-Credential #-credential  used to connect Azure AD 

$Session = New-PSSession -ConfigurationName Microsoft.Exchange -ConnectionUri https://outlook.office365.com/powershell-liveid/ -Credential $Credential -Authentication Basic -AllowRedirection
Import-PSSession $Session -DisableNameChecking -AllowClobber

$StartDate=(((Get-Date).AddDays(-30))).Date  # Report for last 30 days 
$EndDate=Get-Date
$Operation="UserLoggedIn" #Login details
$Results=Search-UnifiedAuditLog  -UserIds 'Abc@abc.com' -StartDate $StartDate -EndDate $EndDate -operations $Operation -ResultSize 1 |select UserIds , CreationDate 
$Results

HTML

Script:

JS