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
# Lock After Password Change System Scheduled Task System | |
# Jacob Regruit | |
# 08/12/2021 | |
Start-Transcript c:\windows\temp\LockOnPasswordChangeSystem.log -Append | |
# Set Paths | |
$LockAfterPasswordChangePath = 'C:\ProgramData\adatum\LockOnPasswordChange' | |
$PreToastPath = 'C:\ProgramData\adatum\LockOnPasswordChange\New-ToastNotification.ps1' | |
$VBSToastPath = 'C:\ProgramData\adatum\LockOnPasswordChange\InstallToastHidden.vbs' |
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
<# | |
.NOTES | |
=========================================================================== | |
Created on: Feb/12/2020 | |
Updated on: Sep/09/2020 | |
Version : 1.0, Initial Release | |
1.1, Updated with timer function | |
Created by: Vinicio Oses | |
Organization: System Center Configuration Manager Costa Rica | |
Filename: Wipe-ConfigMgrAgent.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
# functions were pulled from | |
# https://www.itprotoday.com/powershell/working-ipv4-addresses-powershell | |
function ConvertTo-IPv4MaskString { | |
<# | |
.SYNOPSIS | |
Converts a number of bits (0-32) to an IPv4 network mask string (e.g., "255.255.255.0"). | |
.DESCRIPTION | |
Converts a number of bits (0-32) to an IPv4 network mask string (e.g., "255.255.255.0"). |
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
$MachineSettingsClass = Get-WmiObject -ns "root\sms\site_ps1" -Query "SELECT ResourceID FROM SMS_MachineSettings WHERE ResourceID = '16777220'" | |
if ($MachineSettingsClass) | |
{ | |
Write-Host 'initial check of vars' | |
$MachineSettingsClass.get() | Out-Null | |
$MachineSettingsClass.machinevariables | |
Write-Host 'now clearing vars' | |
$MachineSettingsClass.MachineVariables = @() |
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
$endpoint ='aka.ms','manage.microsoft.com','dc.visualstudio.com','graph.windows.net', | |
'go.microsoft.com','management.azure.com','login.microsoftonline.com','aadcdn.msauth.net', | |
'aadcdn.msftauth.net','configmgrbits.azureedge.net','login.live.com','login.windows.net', | |
'account.live.com','clientconfig.passport.net','gateway.configmgr.manage.microsoft.com' | |
foreach ($i in $endpoint) { | |
$Result = (Test-NetConnection $i -Port 443).TcpTestSucceeded | |
if ($Result -eq $True) { | |
Write-Host "Connection to $i ...... Succeeded." -ForegroundColor Green | |
} else { | |
Write-Host "Connection to $i .......... failed." -ForegroundColor Red } |
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
$workingContentLib = '\\bg--ps1site\SCCMContentLib$' | |
$nonWorkingContentLib = '\\bg--ps1dpmp2.bg-lab.com\SCCMContentLib$' | |
$packageId = 'CS100004' | |
$strings = [System.Collections.Generic.HashSet[string]]::new() | |
get-childitem ('{0}\datalib\{1}*' -f $workingContentLib, $packageId) -Filter "*.ini" | | |
Get-Content | | |
ForEach-Object { | |
$_ -Match 'Hash=(.{4})' | Out-Null |
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
<!-- Office-ProPlus-Updates/Setup-SCCMOfficeUpdates/configuration_template.xml --> | |
<Configuration> | |
<!-- SOURCE DOCUMENTATION: https://technet.microsoft.com/en-us/library/jj219426 --> | |
<!-- <Add SourcePath="\\Server\Share\" Version="15.1.2.3" OfficeClientEdition="32" > | |
<Product ID="O365ProPlusRetail" PIDKEY="12345-12345-12345-12345-12345"> | |
<Language ID="en-us" /> | |
<Language ID="es-es" /> | |
<ExcludeApp ID="Access" /> |
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
#Troubleshoot Win Updates | |
# ISE tip -- F8 = run highlighted text | |
# changelog: | |
# 20231023 - added capi2 eventvwr enable and pshell script to view iis logs. | |
# 20231026 - added more filtering options to iis log script and support to output to csv. | |
# 20231110 - added script to read through capi2 event logs with a searchstring. | |
# 20240118 - added utc->localTime to IIS results | |
# 1\ enable ccm verbose |
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
# Version 1.1 - BFG | |
# cmdline: powershell.exe -ExecutionPolicy Bypass -File zWinUpdateLocalCleanup.ps1 | |
$transcriptLogFilePath = "C:\Windows\CCM\Logs\zWinUpdateLocalCleanup.log" | |
Start-Transcript -Path $transcriptLogFilePath -Force | |
Write-Host "Starting script execution..." | |
Write-Host "Running sfc /scannow" | |
#Start-Process -FilePath $env:windir\system32\sfc.exe -ArgumentList '/scannow' -Wait -Verbose |
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"?> | |
<DesiredConfigurationDigest xmlns="http://schemas.microsoft.com/SystemsCenterConfigurationManager/2009/07/10/DesiredConfiguration"> | |
<!--Authored against the following schema version: 5--> | |
<ConfigurationPolicy AuthoringScopeId="ScopeId_7DA39272-F456-41A7-9E87-14EFC4F3D726" | |
LogicalName="ConfigurationPolicy_01287168-7a17-494d-8009-f7cd24dd9c60" | |
Version="5" | |
ConfigurationFlags="8"> | |
<Annotation xmlns="http://schemas.microsoft.com/SystemsCenterConfigurationManager/2009/06/14/Rules"> | |
<DisplayName Text="Bitlocker Policy Test" | |
ResourceId="ID-fcaeb424-bd4b-4e73-b309-59276f42eeb0"/> |
NewerOlder