This file contains hidden or 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
<# | |
.SYNOPSIS | |
Script to force update Skype for Business Clients Global Address List Written by Michael Mardahl (iphase.dk) | |
(Provided AS-IS! I will not be held liable for any negative consequences) | |
.DESCRIPTION | |
This script will shutdown the SfB client, update the registry and delete the GAL DB, then start the client again. It should be run in the users context as it does user specific things. | |
.EXAMPLE | |
Just run the script without parameters |
This file contains hidden or 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
function sudo | |
{ | |
$file, [string]$arguments = $args; | |
$psi = new-object System.Diagnostics.ProcessStartInfo $file; | |
$psi.Arguments = $arguments; | |
$psi.Verb = "runas"; | |
$psi.WorkingDirectory = get-location; | |
[System.Diagnostics.Process]::Start($psi); | |
} |
This file contains hidden or 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
#Simple script to change all Unified Groups (Office 365 Groups) Primaty SMTP email address to a new domain. | |
#It's recomended to have a diferent email domain for Office 365 Groups, so they dont conflict with regular user and system mailboxes. | |
$groups = get-unifiedgroup | select-object name,alias | |
Foreach ($group in $groups) { | |
Set-UnifiedGroup –Identity "$($group.name)" –PrimarySmtpAddress "$($group.alias)@groups.contoso.com" | |
} |
This file contains hidden or 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
$DomainNames = @( | |
'domA.dk', | |
'domB.dk' | |
) | |
[Net.ServicePointManager]::SecurityProtocol = [Net.SecurityProtocolType]::Tls12 | |
Foreach ($Domain IN $DomainNames) { |
This file contains hidden or 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
<# | |
.DESCRIPTION | |
Quick and dirty script to limit the creation of Office 365 Group or Microsoft Teams (Teams) to a specific security group in Azure AD (or One Synced form on-prem AD) | |
#> | |
#security group that is allowed to create Office 365 Groups | |
$secGroup = "Teams Creation Administrators" | |
#importing AzureAD Module (should be installed!) | |
try { | |
Import-module AzureADPreview |
This file contains hidden or 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"?> | |
<policyDefinitions revision="1.0" schemaVersion="1.0"> | |
<policyNamespaces> | |
<target prefix="outlk16" namespace="outlk16.Office.Microsoft.Policies.Windows" /> | |
<using prefix="windows" namespace="Microsoft.Policies.Windows" /> | |
</policyNamespaces> | |
<supersededAdm fileName="outlk16" /> | |
<resources minRequiredRevision="1.0" /> | |
<categories> | |
<category name="L_MicrosoftOfficeOutlook" displayName="$(string.L_MicrosoftOfficeOutlook)" /> |
This file contains hidden or 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
#Connect to Office 365 Exchange (wont work if MFA is required. | |
#Use conditional access or whitelisting to allow the connection without MFA | |
$LiveCred = Get-Credential | |
$Session = New-PSSession -ConfigurationName Microsoft.Exchange-ConnectionUri https://ps.outlook.com/powershell/ -Credential $LiveCred -Authentication Basic -AllowRedirection | |
Import-PSSession $Session | |
#Get list fo All Room type mailboxes | |
$rooms = Get-MailBox | where {$_.ResourceType -eq "Room"} |
This file contains hidden or 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
# Clean out MDM registration info from machine, in attempt to fix Intune enrollment problems with Windows 10 | |
# after a user reboots, the enrollment process should kick off again. | |
# This special edition, also disables workplace join, as an attempt to mitigate issues with devices previously AAD Registered. | |
# This script has fixed Error codes 0x80180023 and 0x8018002b at some of my customers sites, even without reboot in some cases. | |
# By Michael Mardahl @ Apento.com - @michael_mardahl | |
# Should be run as system user | |
#Disable workplace join if that is happening beyond your control. | |
#Get-ScheduledTask -TaskName "Automatic-Device-Join" | Disable-ScheduledTask |
This file contains hidden or 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
<# | |
.SYNOPSIS | |
This script will map network drives to a specified fileserver (ment to be used as an Intune PowerShell script) | |
.DESCRIPTION | |
The script will test the connection to the domain (via FQDN), in case it fails, there is an option to make it retry again one minute later. | |
If all fails, it will skip the mapping of the drives. | |
.EXAMPLE | |
Just run this script without any parameters in the logged in users context (as an Intune Extensions Powershell script). | |
.NOTES | |
NAME: ps_map_drives.ps1 |
This file contains hidden or 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
# PS-BGInfo | |
# Powershell script that updates the background image with a random image from a folder and writes out system info text to it. | |
# run as a lower priority task | |
[System.Threading.Thread]::CurrentThread.Priority = 'BelowNormal' | |
# Configuration: | |
# Font Family name | |
$font="Input" |
OlderNewer