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
Function Get-ConfigMgrTPMInventory { | |
<# | |
.SYNOPSIS | |
Extract TPM hardware inventory from ConfigMgr | |
.DESCRIPTION | |
Looks for TPM versions and test if the manufacturer is Infineon if its version is vulnerable | |
.PARAMETER ServerName |
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
#Requires -RunAsAdministrator | |
Function Test-InfineonTPMVulnerability { | |
<# | |
.SYNOPSIS | |
Test if Infineon TPM is vulnerable to ADV170012 | |
.DESCRIPTION | |
Test if Infineon TPM is vulnerable to ADV170012 |
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
Configuration NetCeaseConfig { | |
Param ( | |
[string[]]$NodeName = 'localhost' | |
) | |
Import-DscResource –ModuleName 'PSDesiredStateConfiguration' | |
Node $NodeName | |
{ | |
Registry NetCease | |
{ | |
Key = 'HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\LanmanServer\DefaultSecurity' |
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
# minimum size of USB stick 5.29GB | |
# Set here the path of your ISO file | |
$iso = 'C:\Users\localuser\Downloads\en_windows_server_2016_x64_dvd_9327751.iso' | |
# Clean ! will clear any plugged-in USB stick!! | |
Get-Disk | Where BusType -eq 'USB' | | |
Clear-Disk -RemoveData -Confirm:$true -PassThru | |
# Convert GPT |
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
if (-not(Get-VMSwitch -SwitchType Internal -ErrorAction SilentlyContinue| Where Name -eq 'Internal-Test' )) { | |
# Create an internal switch on Hyper-V | |
($VMswitch = New-VMSwitch -Name "Internal-Test" -SwitchType Internal) | |
# Set a static IP address on Hyper-V switch | |
Get-NetAdapter | | |
Where Name -eq "vEthernet ($($VMswitch.Name))" | | |
Where InterfaceDescription -match "Hyper-V\sVirtual\sEthernet Adapter" | | |
New-NetIPAddress -IPAddress 10.0.0.1 -PrefixLength 24 |
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
#Requires -Version 3.0 | |
Function Get-LatestWMF5 { | |
[CmdletBinding()] | |
Param( | |
[parameter(Mandatory)] | |
[system.string]$TargetFolder | |
) | |
Begin { | |
$HT = @{ |
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
#Requires -version 4 | |
#Requires -RunAsAdministrator | |
#Requires -Module Hyper-V | |
# For detailed information on deploying and managing Nano Server, please go to this link: http://www.aka.ms/nanoserver | |
Function New-NanoServer { | |
[CmdletBinding()] | |
Param( | |
[Parameter(Mandatory)] |
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
#Requires -Version 4.0 | |
#Requires -RunAsAdministrator | |
Configuration DeployEMET52 { | |
Param | |
( | |
[string[]]$NodeName = 'localhost' | |
) | |
Node $NodeName | |
{ |
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
#Requires -Version 4.0 | |
#Requires -RunAsAdministrator | |
configuration RemoveEMET52 { | |
param | |
( | |
[string[]]$NodeName = 'localhost' | |
) | |
Node $NodeName | |
{ |
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
$MetaData = New-Object System.Management.Automation.CommandMetaData (Get-Command Get-Culture -CommandType Cmdlet) | |
$functionContent = ([System.Management.Automation.ProxyCommand]::Create($MetaData)) | |
$newcode = @' | |
if ($PSBoundParameters['All']) { | |
$scriptCmd = { & { [System.Globalization.CultureInfo]::GetCultures([System.Globalization.CultureTypes]::AllCultures) }} | |
} else { | |
$wrappedCmd = $ExecutionContext.InvokeCommand.GetCommand('Get-Culture', [System.Management.Automation.CommandTypes]::Cmdlet) | |
$scriptCmd = {& $wrappedCmd @PSBoundParameters } | |
} |
NewerOlder