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 | |
#Requires -module VMware.VimAutomation.Core, VMware.VimAutomation.Vds, Pester, DrsRule | |
[cmdletbinding(SupportsShouldProcess)] | |
param( | |
[parameter(Mandatory, ValueFromPipelineByPropertyName = $true)] | |
[Alias('Name')] | |
[string]$VMName, | |
[parameter(Mandatory, ValueFromPipelineByPropertyName = $true)] |
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-Base64 { | |
param ( | |
$data | |
) | |
# if the $data is a string then ensure it is a byte array | |
if ($data.GetType().Name -eq "String") { | |
$data = [System.Text.Encoding]::UTF8.GetBytes($data) | |
} |
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
Verifying that +devblackops is my blockchain ID. https://onename.com/devblackops |
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
# Example data to feed into script. | |
# In real life, this is an array of hashes | |
# with the required parameters for 1 or more | |
# custom DSC resources to provision infrastructure | |
# The types of resources to create will only be | |
# known at runtime | |
$ResourceData = @( | |
@{ | |
Name = 'fileShareTest' |
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
param( | |
[guid]$guid | |
) | |
$computerName = $env:COMPUTERNAME | |
[DSCLocalConfigurationManager()] | |
Configuration LCMPull { | |
param( | |
[string]$computer, | |
[guid]$guid, |
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
PowerCLI C:\> $spec = get-oscustomizationspec win2k12_dsc | |
PowerCLI C:\> $spec | fl guirunonce | |
GuiRunOnce : {c:\windows\system32\windowspowershell\v1.0\powershell.exe c:\temp\dscbootstrap.ps1} | |
PowerCLI C:\> $specClone = new-oscustomizationspec -OSCustomizationSpec $spec -Type NonPersistent | |
PowerCLI C:\> $specClone | fl guirunonce | |
GuiRunOnce : {c:\windows\system32\windowspowershell\v1.0\powershell.exe c:\temp\dscbootstrap.ps1} |
NewerOlder