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 | |
( | |
[Parameter(Mandatory)] | |
[ValidateNotNullOrEmpty()] | |
[String[]]$ComputerName | |
) | |
# Gets latest configuration from pull server and apply immediately | |
$InvokeMethodSplat = @{ | |
ComputerName = $ComputerName |
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
$WsmanSession = New-CimSession -ComputerName 'Win2008R2Server', 'Win2012Server', 'Win2012R2Server' | |
$DcomSession = New-CimSession -ComputerName 'WinXP', 'Win2003Server' -SessionOption (New-CimSessionOption -Protocol Dcom) | |
$InvokeSplat = @{ | |
CimSession = $WsmanSession, $DcomSession | |
ClassName = 'Win32_NetworkAdapterConfiguration' | |
MethodName = 'SetDNSSuffixSearchOrder' | |
Arguments = @{DNSDomainSuffixSearchOrder=@('contoso.lab','viamonstra.lab')} | |
} | |
Invoke-CimMethod @InvokeSplat |
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 SCCMDistributionPoint | |
{ | |
# Create NO_SMS_ON_DRIVE.SMS file on C:\ drive | |
File NoSmsOnDrive | |
{ | |
DestinationPath = "C:\NO_SMS_ON_DRIVE.SMS" | |
Contents = [System.String]::Empty | |
Type = "File" | |
Ensure = "Present" | |
} |
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
vSphere Clients | |
http://www.empirion.co.uk/vmware/vmware-vsphere-client-direct-download-links/ | |
vSphere PowerCLI | |
http://vmware.com/go/powercli | |
http://blogs.vmware.com/PowerCLI/ | |
https://www.vmware.com/support/developer/PowerCLI/ | |
VMware Tools | |
http://packages.vmware.com/tools |
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
Script WindowsDeploymentServicesInitializeServer | |
{ | |
TestScript = { | |
$WdsServer = (New-Object -ComObject WdsMgmt.WdsManager).GetWdsServer("localhost") | |
return ($WdsServer.SetupManager.InitialSetupComplete) | |
} | |
SetScript = { | |
Start-Process -Wait -FilePath "C:\Windows\System32\wdsutil.exe" -ArgumentList "/Initialize-Server", "/REMINST:D:\Deployment" | |
} |
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
$text = @" | |
<# | |
.SYNOPSIS | |
Sample comment | |
.DESCRIPTION | |
Other comment | |
#> | |
"@ |
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 | |
( | |
[String]$SerialNumber = 'HU265BM18V', | |
[String]$ProductNumber = 'H1P31AA' | |
) | |
$fields = @( | |
'tmp_weCountry=us', | |
"tmp_weSerial=$SerialNumber", | |
"tmp_weProduct=$ProductNumber", |
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 Convert-MacAddress | |
{ | |
<# | |
.SYNOPSIS | |
Converts a MAC address from any valid format to another. | |
.DESCRIPTION | |
The Convert-MacAddress function takes any valid MAC address and converts it to another valid format. | |
Valid formats are: | |
- Six groups of two hex digits separated by hyphens (-), like 01-23-45-ab-cd-ef |
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 Import-DataFile | |
{ | |
<# | |
Posted by Dave Wyatt at http://powershell.org/wp/forums/topic/how-to-store-hashtable-in-configuration-file/ | |
#> | |
param ( | |
[Parameter(Mandatory)] | |
[string] $Path | |
) | |
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 | |
Copy the active SMS encryption certificate to the My store | |
.DESCRIPTION | |
Copy the active SMS encryption certificate to the My store to enable access to the private key for the DSC Local Configuration Manager to decrypt credentials | |
#> | |
Param | |
( | |
[String] $SMSCertificateFriendlyName = 'SMS Encryption Certificate' | |
) |
OlderNewer