This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Install the Teams Module within PowerShell | |
Install-Module MicrosoftTeams | |
# Connect to Microsoft Teams PowerShell | |
Connect-MicrosoftTeams | |
#Get list of Users and export their details to csv | |
Get-CsOnlineUser -Filter {LineURI -ne $Null} | select DisplayName,LineURI,OnlineVoiceRoutingPolicy | Export-CSV c:\temp\teams.csv -NoTypeInformation |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# At the OOBE, open a command prompt session. Shift F10 | |
# Launch PowerShell | |
Powershell.exe | |
# Set PowerShell Execution Policy | |
Set-ExecutionPolicy bypass | |
# Install the AutoPilot Script | |
install-script get-windowsautopilotinfo |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Param ( | |
[string]$Computer = (Read-Host Remote computer name), | |
[int]$Days = 20 | |
) | |
cls | |
$Result = @() | |
Write-Host "Gathering Event Logs, this can take awhile..." | |
$ELogs = Get-EventLog System -Source Microsoft-Windows-WinLogon -After (Get-Date).AddDays(-$Days) -ComputerName $Computer | |
If ($ELogs) | |
{ Write-Host "Processing..." |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?xml version="1.0" encoding="UTF-16"?> | |
<Task version="1.2" xmlns="http://schemas.microsoft.com/windows/2004/02/mit/task"> | |
<RegistrationInfo> | |
<Date>2020-09-15T15:31:06.0051067</Date> | |
<Author>DOMAIN\user</Author> | |
<URI>\Restart Windows Search Service</URI> | |
</RegistrationInfo> | |
<Triggers> | |
<EventTrigger> | |
<Enabled>true</Enabled> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$mailboxes = Get-Mailbox | |
foreach ($mailbox in $mailboxes) | |
{ | |
set-mailbox $mailbox.Alias -removedelayholdapplied | |
set-mailbox $mailbox.Alias -removedelayreleaseholdapplied | |
} | |
$mailboxes = Get-Mailbox | |
foreach ($mailbox in $mailboxes) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Connecting to Teams | |
Connect-MicrosoftTeams | |
# Connecting to Azure AD | |
Connect-AzureAD | |
#Get list of all Teams | |
$AllTeams = get-team | |
# For each team extract members |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# First of all we are assuming we have delegated rights through CSP | |
# If we dont have delegated rights we need a login with reader rights in the customers subscription | |
# We then need 2 things. The Tenant ID of where the source subscription is located | |
# Then we need the subscription ID for the source subscription. | |
# If a customer has multiple subscriptions we will need the IDs for each and the script should be run for each. | |
# If you need to install Azure Module | |
Install-Module AzureRM | |
# Define these 2 variables. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
get-wmiobject Win32_Product | Format-Table IdentifyingNumber, Name, LocalPackage -AutoSize |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
[ | |
{ | |
"toplevel_name": "Company Bookmarks" | |
}, | |
{ | |
"url": "www.Company.co.uk", | |
"name": "Company Home Page" | |
}, | |
{ | |
"url": "https://login.citation.co.uk", |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Optional, To get your tenant ID via PowerShell | |
Connect-msolservice | |
Get-MSOLCompanyInformation | select objectID | |
# Install SharePoint PowerShell If needed | |
Install-Module SharePointPnPPowerShellOnline | |
# Example https://$tenant.sharepoint.com/sites/$siteName | |
$tenant = 'Enter your Tenant Name in Here' # xxxx.onmicrosoft.com | |
$tenantId = 'xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx' #Tenant ID, can be retrieved from Azure AD or PowerShell under optional. |
NewerOlder