Skip to content

Instantly share code, notes, and snippets.

@jborean93
jborean93 / ConvertTo-UnattendedIso.ps1
Created June 17, 2021 02:26
Creates a copy of a Windows ISO to use for unattended Hyper-V installations
# Copyright: (c) 2021, Jordan Borean (@jborean93) <jborean93@gmail.com>
# MIT License (see LICENSE or https://opensource.org/licenses/MIT)
Function ConvertTo-UnattendedIso {
<#
.SYNOPSIS
Converts a Windows ISO to one that doesn't require any keys to press on boot.
.PARAMETER Path
The Windows ISO to convert the UEFI loader to the no_prompt version.
@stefanstranger
stefanstranger / test.ps1
Last active March 6, 2022 01:13
Testing dynamic where in PowerShell
$Test = [PSCustomObject] @{
FirstName = 'Stefan'
LastName = 'Stranger'
#"Difffrent parametr" = 'ok'
}
function Get-WhereObject {
[cmdletBinding()]
param(
[Parameter(Mandatory, Position = 0, ValueFromPipeline)][PSCustomObject] $Test
@murrahjm
murrahjm / psinventory.ps1
Created September 18, 2019 13:02
ansible dynamic inventory script in powershell
#!/usr/bin/env powershell
if ($args -contains '--list') {
$output = @{
'all' = @('server1.domain.com', 'server2.domain.com')
'webservers' = @('server1.domain.com')
'_meta' = @{
'hostvars' = @{
'server1.domain.com' = @{
myvar = 'metavariable'
@riverar
riverar / features.json
Last active November 8, 2023 20:46
Quick n' dirty hack to enable Your Phone remoting, notification and other experiments
{
"AATes123": true,
"AcrylicAndBackground": true,
"AudioInfoSync": true,
"BatteryIndicator": true,
"CallingDiscoveryTimeout": 30,
"CallingEnableOnARM": true,
"CallingFromMessages": true,
"CallingLabelInProd": true,
"CallingNode": true,
@BenjaminArmstrong
BenjaminArmstrong / VMCXEditor.ps1
Created April 19, 2017 00:18
PowerShell to edit VMCX files
# Editing a virtual machine file
# This PowerShell code takes an unregistered VMCX file
# It change the VM Name, disables Dynamic Memory, and sets the memory to 2GB
# It then saves the changed virtual machine configuration to a new path
# Parameters that will be changed
$VMConfigurationToEdit = "D:\VMs\Virtual Machines\3F99446F-1D9A-4010-8C8B-4E554E845181.vmcx"
$pathToSaveNewConfigTo = "D:\"
$newVMName= "NewVMName"
@Francesco149
Francesco149 / shige-skins.md
Last active March 31, 2024 14:53
Shigetora / Cookiezi skin compilation
@drolfe
drolfe / ADD User Account to iLO.xml
Last active August 11, 2023 23:14
HP iLO XML Scripts
HPONCFG all << end_marker
<RIBCL VERSION="2.0">
<LOGIN USER_LOGIN="Dontcare" PASSWORD="UsingAutologin">
<USER_INFO MODE="write">
<ADD_USER
USER_NAME="daniel"
USER_LOGIN="daniel"
PASSWORD="daniel123">
<ADMIN_PRIV value ="Yes"/>
<REMOTE_CONS_PRIV value ="Yes"/>