Skip to content

Instantly share code, notes, and snippets.

View neerajks77's full-sized avatar

Neeraj Kumar neerajks77

View GitHub Profile
@neerajks77
neerajks77 / M365LicenseUsageAnalysis.ps1
Created February 19, 2024 19:04
This script is used to create M265 License Usage Analysis reports
<#
Author: Neeraj Kumar
This script is used to create M265 License Usage Analysis reports. Please create required variables under shared resources.
Also register an app within Microsoft Entra Id with API permissions for Microsoft Graph usage.
CreatedDate : 24-Nov-2023
#>
$global:tenantId = Get-AutomationVariable -Name 'TenantId'
@neerajks77
neerajks77 / Get-SharePointMonitoringReports.ps1
Last active February 19, 2024 19:01
Updated - Extract the details of the SharePoint Online Sites that includes Site URL, Administrator Email, Group Email Id, Storage Space Used, and User Count - Updated
#####################################################################################
######Author: Neeraj Kumar
######Created: 28/09/2023
######Usage: Extract the details of Microsoft SharePoint that includes Site Team and channel details, storage space, owner details, etc. Please create required variables under shared resources.
#####################################################################################
# Variables from Azure Automation Account
$tenantId = Get-AutomationVariable -Name 'TenantId'
$clientId = Get-AutomationVariable -Name 'ClientId'
$clientSecret = Get-AutomationVariable -Name 'ClientSecret'
@neerajks77
neerajks77 / Get-SharePointDetails.ps1
Created February 19, 2024 18:57
Extract the details of the SharePoint Online Sites that includes Site URL, Administrator Email, Group Email Id, Storage Space Used, and User Count
#####################################################################################
######Author: Neeraj Kumar
######Created: 28/09/2023
######Usage: Extract the details of the SharePoint Online Sites that includes Site URL, Administrator Email, Group Email Id, Storage Space Used, and User Count. Please create required variables under shared resources.
#####################################################################################
# Retrieve the stored username and password from Azure Automation variables
$adminUrl = Get-AutomationVariable -Name 'AdminURL'
$username = Get-AutomationVariable -Name 'SPAdminUsername'
$password = Get-AutomationVariable -Name 'SPAdminPassword' | ConvertTo-SecureString -AsPlainText -Force
@neerajks77
neerajks77 / Get-OneDriveReports.ps1
Created February 19, 2024 18:53
This script is used to create OneDrive Monitoring and governance reports
#####################################################################################
######Author: Neeraj Kumar
######Created: 28/09/2023
######Usage: This script is used to create OneDrive Monitoring and governance reports. Please create required variables under shared resources.
#####################################################################################
$global:tenantId = Get-AutomationVariable -Name 'TenantId'
$global:clientId = Get-AutomationVariable -Name 'ClientId'
$global:clientSecret = Get-AutomationVariable -Name 'ClientSecret'
$global:certThumbprint = Get-AutomationVariable -Name 'CERT_THUMBPRINT'
@neerajks77
neerajks77 / Get-MSTeamsMonitoringReports.ps1
Created February 19, 2024 18:50
Extract the details of Microsoft Teams that includes Site Team and channel details, storage space, owner details, etc.
#####################################################################################
######Author: Neeraj Kumar
######Created: 28/09/2023
######Usage: Extract the details of Microsoft Teams that includes Site Team and channel details, storage space, owner details, etc.
#####################################################################################
# Variables from Azure Automation Account
$tenantId = Get-AutomationVariable -Name 'TenantId'
$clientId = Get-AutomationVariable -Name 'ClientId'
$clientSecret = Get-AutomationVariable -Name 'ClientSecret'
<#
Author: Neeraj Kumar
This script is used to create Exchange Online Monitoring and governance reports. Please create required variables under shared resources.
Also register an app within Microsoft Entra Id with API permissions for Exchange.ManageAsApp and give the role of Exchange Administrator.
CreatedDate : 24-Nov-2023
#>
$global:accessToken=$null
$tenantId = Get-AutomationVariable -Name 'TenantId'
@neerajks77
neerajks77 / Get-TenantAppDetails.ps1
Created February 19, 2024 18:41
This PowerShell Automation Runbook script fetches the details of all the apps registered/created within Microsoft Entra ID (Azure AD).
<#################################################################################
Author: Neeraj Kumar
Description: This PowerShell Automation Runbook script fetches the details of all the apps registered/created within Microsoft Entra ID (Azure AD). The result is finally ouputted to a folder within SharePoint document library.
Please create all the variables with their values in the shared resources inside variables within Automation Account before use.
#################################################################################>
# Variables from Azure Automation Account
$Global:spSiteUrl = Get-AutomationVariable -Name 'SharePointSiteUrl'
$Global:spSiteName = Get-AutomationVariable -Name 'SharePointSiteName'
$Global:spLibraryName = Get-AutomationVariable -Name 'TenantDocumentLibraryName'
###############################################
#Author:Neeraj Kumar
#Description:This script intakes the parameters from incoming ServiceNow Requests for setting the email size limit
#Date: 09/21/2023
####. ###########################################
param(
[parameter (mandatory = $false)]
[object] $WebhookData
)
@neerajks77
neerajks77 / updated-function-calling.ipynb
Created September 22, 2023 14:10
Updated Function Calling.ipynb
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@neerajks77
neerajks77 / SetMailboxQuota.ps1
Last active September 8, 2023 08:20
This script intakes the parameters from incoming ServiceNow Requests for setting the email size limit
###############################################
#Author:Neeraj Kumar
#Description:This script intakes the parameters from incoming ServiceNow Requests for setting the email size limit
#Date: 01/19/2023
####. ###########################################
param(
[Parameter(Mandatory=$true)]
[string] $ServiceRequestNumber,