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-InstalledModule | ForEach-Object { | |
$CurrentVersion = $PSItem.Version | |
Get-InstalledModule -Name $PSItem.Name -AllVersions | Where-Object -Property Version -LT -Value $CurrentVersion | |
} | Uninstall-Module -Verbose |
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
# Site configuration | |
$SiteCode = "TES" # Site code | |
$ProviderMachineName = "Primary.domain.LOCAL" # SMS Provider machine name | |
# Customizations | |
$initParams = @{} | |
#$initParams.Add("Verbose", $true) # Uncomment this line to enable verbose logging | |
#$initParams.Add("ErrorAction", "Stop") # Uncomment this line to stop the script on any errors |
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
$argument = '/installtunnelservice "C:\Program Files\WireGuard\Data\Configurations\wg0.conf"' | |
$action = New-ScheduledTaskAction -Execute 'C:\Program Files\WireGuard\wireguard.exe' -Argument $argument | |
$principal = New-ScheduledTaskPrincipal -UserID "NT AUTHORITY\SYSTEM" -LogonType ServiceAccount -RunLevel Highest | |
$trigger = New-ScheduledTaskTrigger -AtStartup | |
$task = New-ScheduledTask -Action $action -Principal $principal -Trigger $trigger | |
Register-ScheduledTask "WireGuard" -InputObject $task -Force -TaskPath "Custom" |
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
<# | |
.SYNOPSIS | |
Export CSV of Dell Models and their release dates | |
.DESCRIPTION | |
This script will download and extract the latest Dell Driver Cab to use it to determine the release dates of all dell models | |
.NOTES |
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( | |
[Parameter(Mandatory = $True)] | |
[string[]]$UserIDs, | |
[Parameter(Mandatory = $True)] | |
[int]$Duration | |
) | |
foreach ($UserID in $UserIDs) { | |
$GrantAdminTo = "Domain\" + $UserID |
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
$parms2 = @{ | |
Description = "PS Test" | |
Name = "Windows Updates - Office 365 x86" | |
Path = "\\pathToFileShare\sccm\Software_Library\Updates\Windows Updates - Office 365 x86" | |
Priority = "Low" | |
} | |
New-CMSoftwareUpdateDeploymentPackage @parms2 | |
$parms = @{ |
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
$OneDriveFolder = "$home\OneDrive\Documents\.backup" | |
$Date = Get-Date -Format "MM-dd-yyyy" | |
$logFile = "$OneDriveFolder\Backup-UserFoldersLog_$Date.log" | |
Start-Transcript -Path "$logFile" -Append -Force | |
if(!(Test-Path -Path $OneDriveFolder)){ | |
New-Item -Path $OneDriveFolder -ItemType Directory | |
} | |
if (!((get-item $OneDriveFolder -Force).Attributes.HasFlag([System.IO.FileAttributes]::Hidden))) { | |
Write-Output "Hiding backup folder $OneDriveFolder" |
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
<# | |
.SYNOPSIS | |
This script performs the installation or uninstallation of an application(s). | |
# LICENSE # | |
PowerShell App Deployment Toolkit - Provides a set of functions to perform common application deployment tasks on Windows. | |
Copyright (C) 2017 - Sean Lillis, Dan Cunningham, Muhammad Mashwani, Aman Motazedian. | |
This program is free software: you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation, either version 3 of the License, or any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. | |
You should have received a copy of the GNU Lesser General Public License along with this program. If not, see <http://www.gnu.org/licenses/>. | |
.DESCRIPTION | |
The script is provided as a template to perform an install or uninstall of an applica |
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
#Load Assembly and Library | |
Add-Type -AssemblyName PresentationFramework | |
#XAML form designed using Vistual Studio | |
#[xml]$Form = Get-Content -Path "$PSScriptRoot\USMTGUI.xaml" | |
[xml]$Form = @" | |
<Window | |
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" | |
Title="Migration Assistant by Nick Rodriguez" Height="600" Width="1000" MinWidth="1000" MinHeight="600"> | |
<Grid> |
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
#Load Assembly and Library | |
Add-Type -AssemblyName PresentationFramework | |
#XAML form designed using Vistual Studio | |
#[xml]$Form = Get-Content -Path "$PSScriptRoot\USMTGUI.xaml" | |
[xml]$Form = @" | |
<Window | |
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" | |
Title="Migration Assistant by Nick Rodriguez" Height="550" Width="1000" MinWidth="1000" MinHeight="550"> | |
<Grid> |
NewerOlder