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
# Script to send a daily audit report for admin activities in MEM/Intune | |
# Requirements: | |
# - Log Analytics Workspace | |
# - Intune Audit Logs saved to workspace | |
# - Service Principal with 'Log Analytics reader' role in workspace | |
# - Azure Az PowerShell modules | |
# Azure resource info | |
$ApplicationId = "abc73938-0000-0000-0000-9b01316a9123" # Service Principal Application Id | |
$Secret = "489j49r-0000-0000-0000-e2dc6451123" # Service Principal Secret |
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
Add-Type -AssemblyName PresentationFramework,System.Windows.Forms | |
# Set screen working area, and start and finish location of the window 'top' property (for animation) | |
$workingArea = [System.Windows.Forms.Screen]::PrimaryScreen.WorkingArea | |
$TopStart = $workingArea.Top - 449 | |
$TopFinish = $workingArea.Top + 10 | |
[xml]$Xaml = @" | |
<Window | |
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" |
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
## Uploads client logs files to Azure storage | |
$Logs = Get-ChildItem "$env:SystemRoot\CCM\Logs" | |
$Date = Get-date -Format "yyyy-MM-dd-HH-mm-ss" | |
$ContainerURL = "https://mystorageaccount.blob.core.windows.net/mycontainer" | |
$FolderPath = "ClientLogFiles/$($env:COMPUTERNAME)/$Date" | |
$SASToken = "?sv=2019-10-10&ss=b&srt=o&sp=c&se=2030-05-01T06:31:59Z&st=2020-04-30T22:31:59Z&spr=https&sig=123456789abcdefg" | |
$Responses = New-Object System.Collections.ArrayList | |
$Stopwatch = New-object System.Diagnostics.Stopwatch |
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
# User-context script to set the Language List | |
# Language codes | |
$PrimaryLanguage = "en-GB" | |
$SecondaryLanguage = "en-US" | |
$PrimaryInputCode = "0809:00000809" | |
$SecondaryInputCode = "0409:00000409" | |
# Set preferred languages | |
$NewLanguageList = New-WinUserLanguageList -Language $PrimaryLanguage |
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
# Admin-context script to set the administrative language defaults, system locale and install optional features for the primary language | |
# Language codes | |
$PrimaryLanguage = "en-GB" | |
$SecondaryLanguage = "en-US" | |
$PrimaryInputCode = "0809:00000809" | |
$SecondaryInputCode = "0409:00000409" | |
$PrimaryGeoID = "242" | |
# Enable side-loading |
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
[CmdletBinding(DefaultParameterSetName='All')] | |
Param | |
( | |
[Parameter(ParameterSetName='All',Mandatory=$true,ValueFromPipelineByPropertyName=$true,ValueFromPipeline=$true)] | |
[Parameter(ParameterSetName='Individual',Mandatory=$true,ValueFromPipelineByPropertyName=$true,ValueFromPipeline=$true)] | |
[string[]]$ComputerName, | |
[Parameter(ParameterSetName='All')] | |
[switch]$All = $True, | |
[Parameter(ParameterSetName='Individual')] | |
[switch]$AD, |
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
[CmdletBinding()] | |
Param | |
( | |
[Parameter(Mandatory=$false)] | |
[ValidateSet('64-bit','32-bit')] | |
$Architecture = "64-bit" | |
) | |
# Load the HP driver pack web page | |
If ($Architecture -eq "64-bit") |
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
[CmdletBinding()] | |
Param | |
( | |
[Parameter(Mandatory=$false,ValueFromPipelineByPropertyName=$true,ValueFromPipeline=$true)] | |
[string[]]$ComputerName = $env:COMPUTERNAME | |
) | |
Begin | |
{ |
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
############################################################## | |
## ## | |
## Reads the most recent and next scheduled evaluation time ## | |
## for deployed Compliance Baselines from the Scheduler.log ## | |
## ## | |
############################################################## | |
#requires -RunAsAdministrator | |
# Get Baselines from WMI |