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 ConvertTo-ProcessMitigationOption { | |
[OutputType([String])] | |
param ( | |
[Switch] | |
$DEPEnable, | |
[Switch] | |
$DEPATLThunkEnable, | |
[Switch] |
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
''' | |
Created on Mar 27, 2011 | |
@author: hassane | |
@original: http://code.activestate.com/recipes/577649-dhcp-query/ | |
@modified: Rusty Myers - June 2016 with much help from @frogor and @bruienne. Thanks! | |
@requirments: python3 | |
@function: returns DHCP offer and BSDP list | |
@notes: BSDP format - https://static.afp548.com/mactips/bootpd.html | |
''' |
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
curl --include \ | |
--no-buffer \ | |
--header "Connection: Upgrade" \ | |
--header "Upgrade: websocket" \ | |
--header "Host: example.com:80" \ | |
--header "Origin: http://example.com:80" \ | |
--header "Sec-WebSocket-Key: SGVsbG8sIHdvcmxkIQ==" \ | |
--header "Sec-WebSocket-Version: 13" \ | |
http://example.com:80/ |
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-WmiNamespace { | |
<# | |
.SYNOPSIS | |
Returns a list of WMI namespaces present within the specified namespace. | |
.PARAMETER Namespace | |
Specifies the WMI repository namespace in which to list sub-namespaces. Get-WmiNamespace defaults to the ROOT namespace. |
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
### | |
### | |
### UPDATE: For Win 11, I recommend using this tool in place of this script: | |
### https://christitus.com/windows-tool/ | |
### https://github.com/ChrisTitusTech/winutil | |
### https://www.youtube.com/watch?v=6UQZ5oQg8XA | |
### iwr -useb https://christitus.com/win | iex | |
### | |
### |
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
' Calls WshShell.Exec with c and kills the process tree after the specified timeout t | |
' Returns the created WshScriptExec object | |
Function Exec(c, t) | |
Dim s, e : Set s = CreateObject("WScript.Shell") : Set e = s.Exec(c) | |
Do While e.Status = 0 | |
Call s.Run("waitfor /t 1 OneSecond", 0, True) | |
t = t - 1 | |
If 0 >= t Then | |
Call s.Run("taskkill /t /f /pid " & e.ProcessId, 0, True) | |
Exit Do |
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-DellFoundationServicesWmiObject { | |
<# | |
.SYNOPSIS | |
Performs a WMI query on a Dell Foundation Services server. | |
Author: Matthew Graeber (@mattifestation) | |
License: BSD 3-Clause | |
.DESCRIPTION |
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
echo -----BEGIN CERTIFICATE----- > encoded.txt | |
echo Just Base64 encode your binary data | |
echo TVoAAA== >> encoded.txt | |
echo -----END CERTIFICATE----- >> encoded.txt | |
certutil -decode encoded.txt decoded.bin |
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
#!/bin/bash | |
# 1 = VMware Tools ISO is mounted from vSphere | |
# 2 = Download VMware Tools (assumes you can connect to internet) | |
INSTALL_METHOD=2 | |
# Thanks to Rich Trouton for tip on Tools being available online | |
VMWARE_TOOLS_DOWNLOAD_URL=http://softwareupdate.vmware.com/cds/vmw-desktop/fusion/7.1.2/2779224/packages/com.vmware.fusion.tools.darwin.zip.tar | |
# DO NOT MODIFY BEYOND HERE # |
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 | |
Detects if the passed Physical Disk Id is a Solid State Disk (SSD) or a | |
spindle disk. Returns true for an SSD and false for anything else. | |
.DESCRIPTION | |
Use Get-PhysicalDisk to get the Physical Disk Ids for the system you wish | |
to test. This script supports values being passed throught the pipeline. | |
The methods used for detecting are by reading the Nominal Media Rotation |