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
Find-Module xPSDesiredStateConfiguration | Install-Module |
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
Invoke-Command -Computername zcert01 {Get-Childitem Cert:\LocalMachine\My | Where-Object {$_.FriendlyName -eq "PSDSCPullServerCert"} | Select-Object -ExpandProperty ThumbPrint} |
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 HTTPSPullServer | |
{ | |
# Modules must exist on target pull server | |
Import-DSCResource -ModuleName xPSDesiredStateConfiguration -ModuleVersion 3.6.0.0 | |
Import-DSCResource -ModuleName PSDesiredStateConfiguration | |
Node ZPull01 | |
{ | |
WindowsFeature DSCServiceFeature | |
{ |
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
Start-Process -FilePath iexplore.exe https://zpull01.zephyr.org:8080/PSDSCPullServer.svc |
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 Publish-DSCResourcePull { | |
Param( | |
[string[]] | |
$Module | |
) | |
foreach ($ModuleName in $Module){ | |
$ModuleVersion = (Get-Module $ModuleName -ListAvailable).Version | |
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
<?xml version="1.0" encoding="utf-8"?> | |
<labbuilderconfig xmlns="labbuilderconfig" name="WEFADSecurityLogs" version="1.0"> | |
<description></description> | |
<settings labpath="G:\WEFADSecurityLogs" /> | |
<resources> | |
<msu name="WMF5.0-WS2012R2-W81" url="https://download.microsoft.com/download/2/C/6/2C6E1B4A-EBE5-48A6-B225-2D2058A9CEFB/Win8.1AndW2K12R2-KB3134758-x64.msu" /> | |
<msu name="WMF5.0-WS2012-W8" url="https://download.microsoft.com/download/2/C/6/2C6E1B4A-EBE5-48A6-B225-2D2058A9CEFB/W2K12-KB3134759-x64.msu" /> | |
<msu name="WMF5.0-WS2008R2-W7" url="https://download.microsoft.com/download/2/C/6/2C6E1B4A-EBE5-48A6-B225-2D2058A9CEFB/Win7AndW2K8R2-KB3134760-x64.msu" /> | |
</resources> | |
<switches> |
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 Collector | |
{ | |
Import-DscResource –ModuleName PSDesiredStateConfiguration | |
Import-DscResource -ModuleName xWindowsEventForwarding | |
Windowsfeature RSATADPowerShell{ | |
Ensure = 'Present' | |
Name = 'RSAT-AD-PowerShell' | |
} |
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 CredentialEncryptExample { | |
Param ( | |
[Parameter(Mandatory=$true)] | |
[PSCredential]$Credential | |
) | |
Node $AllNodes.NodeName | |
{ | |
Group TestGroup{ | |
GroupName = 'TestGroup' |
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 Export-MachineCert { | |
<# | |
.SYNOPSIS | |
Harvests a certificate from a remote system. | |
.DESCRIPTION | |
Invokes a command on a remote system to copy the certificate to the machine running the command. | |
.PARAMETER Computername | |
Specifies the name of the remote system to harvest the certificate. | |
.PARAMETER Path | |
Provides the path where the certificate is copied to on the host system. |
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 Move-ADGroupMemberofToMember { | |
<# | |
.SYNOPSIS | |
Moves all Member Of objects to the Members section of an Active Directory group. | |
.DESCRIPTION | |
Queries an Active Directory group for all Member Of groups then add them to the members section | |
and removes them from the member of section of the active directory group. | |
.PARAMETER TargetGroup | |
Specify the group to run the cmdlet against. | |
.EXAMPLE |