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
<#PSScriptInfo | |
.VERSION 2019.3.25.900 | |
.GUID cd6e3726-52d2-4ae0-b423-1d4d8853775f | |
.AUTHOR Shannon Graybrook | |
.COMPANYNAME Methode Electronics |
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
# | |
# Module manifest for module 'PSmRemoteNG' | |
# | |
# Generated by: Shannon Graybrook | |
# | |
# Generated on: 7/18/2019 | |
# | |
@{ |
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
Import-Module GroupPolicy -ErrorAction Stop | |
Get-GPO -All | | |
ForEach-Object { Write-Host ( 'Processing GPO ''{0}''...' -f $_.DisplayName ); $_ } -pv 'GPO' | | |
Get-GPOReport -ReportType Xml | | |
ForEach-Object { [xml]$_ } | | |
foreach-Object { | |
$_.GPO.User.ExtensionData | | |
Where-Object { $_.Name -eq 'Scripts' } | |
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
Add-Type -Path 'C:\Program Files (x86)\mRemoteNG\BouncyCastle.Crypto.dll' | |
function ConvertFrom-MRNGSecurePassword { | |
param( | |
[Parameter(Mandatory)] | |
[ValidateNotNullOrEmpty()] | |
[string] | |
$EncryptedMessage, |
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
<# | |
Disclaimer: | |
This module is provided AS IS without warranty of any kind. This work is based off work by | |
other talented individuals, and should not be considered an original work. | |
Modified into module by Shannon Graybrook | |
Modified by Graeme Bray | |
Original Content by Steve Lee |
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
# filter for server core | |
$Query = 'SELECT * FROM Win32_OptionalFeature WHERE Caption = "Microsoft-Windows-Server-Gui-Shell-Package-DisplayName" AND InstallState = "2"' | |
Get-WmiObject -Query $Query |
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
# the same script as a one liner: | |
# shutdown -r -t ( [math]::Ceiling( ([datetime]"1PM").Subtract((Get-Date)).TotalSeconds ) | |
param( | |
[Parameter(Mandatory=$true)] | |
[datetime] | |
$When | |
) | |
$Now = Get-Date |
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
@ECHO OFF | |
SET mytime=%time: =0% | |
SET dtstamp=%date:~-4%%date:~4,2%%date:~7,2%%mytime:~0,2%%time:~3,2%%time:~6,2% | |
notepad %TEMP%\cert_%dtstamp%.req | |
certreq -submit -attrib "CertificateTemplate:WebServer10Y" %TEMP%\cert_%dtstamp%.req %TEMP%\cert_%dtstamp%.cer | |
notepad %TEMP%\cert_%dtstamp%.cer | |
SET /P answer=Save the generated certificate? (y/N) |
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
ie4uinit.exe -ClearIconCache | |
taskkill /IM explorer.exe /F | |
DEL "%localappdata%\IconCache.db" /A | |
explorer |