full_path
stringlengths
31
232
filename
stringlengths
4
167
content
stringlengths
0
48.3M
PowerShellCorpus/PowerShellGallery/AutoBrowse/1.0/Get-Browser.ps1
Get-Browser.ps1
function Get-Browser { <# .Synopsis Gets open browsers .Description Gets browsers that have already been opened .Example Get-Browser .Link Open-Browser #> param( [Switch] $Bodyhtml ) process { (New-Object -ComObj...
PowerShellCorpus/PowerShellGallery/AutoBrowse/1.0/Set-BrowserLocation.ps1
Set-BrowserLocation.ps1
function Set-BrowserLocation { <# .Synopsis Sets the location of an open browser .Description Sets the location of a browser, and waits for the new location to load .Example Open-Browser | Set-BrowserLocation -Url http://start-automating.com .Link ...
PowerShellCorpus/PowerShellGallery/AutoBrowse/1.0/Wait-Browser.ps1
Wait-Browser.ps1
function Wait-Browser { <# .Synopsis Waits for a browser to finish loading .Description Waits for a browser to finish loading all elements .Example Open-Browser -Url http://Start-Automating.com -DoNotWait | Wait-Browser .Link Open-Brow...
PowerShellCorpus/PowerShellGallery/AutoBrowse/1.0/Set-BrowserControl.ps1
Set-BrowserControl.ps1
function Set-BrowserControl { <# .Synopsis Sets a value in a browser control .Description Sets the value of a control in a browser, and fires an On_Change event .Link Get-BrowserControl #> [CmdletBinding(DefaultParameterSetName='Id')] [OutputType([PSObject]...
PowerShellCorpus/PowerShellGallery/AutoBrowse/1.0/Get-BrowserControl.ps1
Get-BrowserControl.ps1
function Get-BrowserControl { <# .Synopsis Gets a control from a browser .Description Gets a control from a browser. Controls can be selected by id, name, tagname, and innertext .Link Get-BrowserControl .Link Open-Browser #> [CmdletBinding(Defau...
PowerShellCorpus/PowerShellGallery/AutoBrowse/1.0/Open-Browser.ps1
Open-Browser.ps1
function Open-Browser { <# .Synopsis Opens a new Browser .Description Opens a new Browser for automated browsing .Example Open-Browser .Example Open-Browser -Visible .Example Open-Browser -Url http://start-automating.com/ ...
PowerShellCorpus/PowerShellGallery/AutoBrowse/1.0/Invoke-BrowserControl.ps1
Invoke-BrowserControl.ps1
function Invoke-BrowserControl { <# .Synopsis Clicks or fires events in a browser control. .Description Clicks or fires events in a browser control, and waits for the change. .Link Get-BrowserControl #> [CmdletBinding(DefaultParameterSetName='Id')] ...
PowerShellCorpus/PowerShellGallery/AutoBrowse/1.0/Close-Browser.ps1
Close-Browser.ps1
None
PowerShellCorpus/PowerShellGallery/MVA_DSC_2015_DAY1/0.0.0.2/Scripts/Reskit9/All Resources/xSafeHarbor/Assert-SafeHarborScenario.ps1
Assert-SafeHarborScenario.ps1
<# .SYNOPSIS This script is used to deploy and validate SafeHarbor example .DESCRIPTION This script allows you to exercise the SafeHarbor example which sets up a secure environment to run a particular application or service inside of an assume-breached network. This substantially reduces the attack surfac...
PowerShellCorpus/PowerShellGallery/MVA_DSC_2015_DAY1/0.0.0.2/Scripts/Reskit9/All Resources/xSafeHarbor/ConfigurationData/SafeHarborConfigurationData.ps1
SafeHarborConfigurationData.ps1
<# Configuration data for - - DHCP Server - Corporate Domain Controller - Corporate Client - SafeHarbor Domain Controller - SafeHarbor Management Server - SafeHarbor Pull Server - SafeHarbor File Server - Hyper-V Host #> param ([st...
PowerShellCorpus/PowerShellGallery/MVA_DSC_2015_DAY1/0.0.0.2/Scripts/Reskit9/All Resources/xSafeHarbor/ConfigurationData/VMData/ConfigureFSVM.ps1
ConfigureFSVM.ps1
# Trigger LCM pull using the CIM Method. function TriggerLCMByCallingCimMethod { param([ValidateSet(1,2,3)] [system.uint32]$flag = 1) Invoke-CimMethod -Namespace root/microsoft/windows/desiredstateconfiguration -class MSFT_DSCLocalConfigurationManager -name PerformRequiredConfigurationChecks -arguments @{...
PowerShellCorpus/PowerShellGallery/MVA_DSC_2015_DAY1/0.0.0.2/Scripts/Reskit9/All Resources/xSafeHarbor/ConfigurationData/VMData/ConfigureVM.ps1
ConfigureVM.ps1
$scriptFolder = Split-Path $script:MyInvocation.MyCommand.Path Configuration VMMetaConfig { Node localhost { LocalConfigurationManager { RebootNodeIfNeeded = "true" CertificateID = "497258FCCFFFA0F38268BBD970B337D25C871D6D" } } } VMMetaConfig -Ou...
PowerShellCorpus/PowerShellGallery/MVA_DSC_2015_DAY1/0.0.0.2/Scripts/Reskit9/All Resources/xSafeHarbor/ConfigurationData/VMData/Startup.ps1
Startup.ps1
Import-Module $env:SystemDrive\Windows\System32\WindowsPowerShell\v1.0\modules\SmbShare\SmbShare.cdxml Import-Module $PSScriptRoot\ProxyFunctions.psm1 $IRCommands = @("Get-Command","Out-Default","Exit-PSSession","Measure-Object","Select-Object") $allowedCommands = New-Object System.Collections...
PowerShellCorpus/PowerShellGallery/MVA_DSC_2015_DAY1/0.0.0.2/Scripts/Reskit9/All Resources/xSafeHarbor/ConfigurationData/VMData/ImportCerts.ps1
ImportCerts.ps1
$scriptLocation = $PSScriptRoot $null = [Reflection.Assembly]::Load("System.Security, Version=2.0.0.0, Culture=Neutral, PublicKeyToken=b03f5f7f11d50a3a") $flags = [System.Security.Cryptography.X509Certificates.X509KeyStorageFlags]::MachineKeySet -bor [System.Security.Cryptography.X509Certificates.X509KeyStorageFlag...
PowerShellCorpus/PowerShellGallery/MVA_DSC_2015_DAY1/0.0.0.2/Scripts/Reskit9/All Resources/xAzurePack/Examples/AzurePack-SeperateSQL.ps1
AzurePack-SeperateSQL.ps1
#requires -Version 5 Configuration AzurePack { Import-DscResource -Module xSQLServer Import-DscResource -Module xCredSSP Import-DscResource -Module xAzurePack # Set role and instance variables $Roles = $AllNodes.Roles | Sort-Object -Unique foreach($Role in $Roles) { $Se...
PowerShellCorpus/PowerShellGallery/MVA_DSC_2015_DAY1/0.0.0.2/Scripts/Reskit9/All Resources/xSCVMM/Examples/SCVMM-SeperateSQL-TP.ps1
SCVMM-SeperateSQL-TP.ps1
#requires -Version 5 Configuration VMM { Import-DscResource -Module xSQLServer Import-DscResource -Module xSCVMM # Set role and instance variables $Roles = $AllNodes.Roles | Sort-Object -Unique foreach($Role in $Roles) { $Servers = @($AllNodes.Where{$_.Roles | Where-Object {...
PowerShellCorpus/PowerShellGallery/MVA_DSC_2015_DAY1/0.0.0.2/Scripts/Reskit9/All Resources/xSCVMM/Examples/SCVMM-SingleServer.ps1
SCVMM-SingleServer.ps1
#requires -Version 5 Configuration VMM { Import-DscResource -Module xSQLServer Import-DscResource -Module xSCVMM # Set role and instance variables $Roles = $AllNodes.Roles | Sort-Object -Unique foreach($Role in $Roles) { $Servers = @($AllNodes.Where{$_.Roles | Where-Object {...
PowerShellCorpus/PowerShellGallery/MVA_DSC_2015_DAY1/0.0.0.2/Scripts/Reskit9/All Resources/xSCVMM/Examples/SCVMM-SeperateSQL.ps1
SCVMM-SeperateSQL.ps1
#requires -Version 5 Configuration VMM { Import-DscResource -Module xSQLServer Import-DscResource -Module xSCVMM # Set role and instance variables $Roles = $AllNodes.Roles | Sort-Object -Unique foreach($Role in $Roles) { $Servers = @($AllNodes.Where{$_.Roles | Where-Object {...
PowerShellCorpus/PowerShellGallery/MVA_DSC_2015_DAY1/0.0.0.2/Scripts/Reskit9/All Resources/xSCVMM/Examples/SCVMM-SingleServer-TP.ps1
SCVMM-SingleServer-TP.ps1
#requires -Version 5 Configuration VMM { Import-DscResource -Module xSQLServer Import-DscResource -Module xSCVMM # Set role and instance variables $Roles = $AllNodes.Roles | Sort-Object -Unique foreach($Role in $Roles) { $Servers = @($AllNodes.Where{$_.Roles | Where-Object {...
PowerShellCorpus/PowerShellGallery/MVA_DSC_2015_DAY1/0.0.0.2/Scripts/Reskit9/All Resources/xDatabase/Examples/Sample_xDBPackage.ps1
Sample_xDBPackage.ps1
configuration DbBackup { param ( [PSCredential]$Credentials, [Parameter(Mandatory)] [ValidateNotNullOrEmpty()] [String]$DatabaseName, [Parameter(Mandatory)] [ValidateNotNullOrEmpty()] [String]$SqlServer, [Parameter(Mandatory)] ...
PowerShellCorpus/PowerShellGallery/MVA_DSC_2015_DAY1/0.0.0.2/Scripts/Reskit9/All Resources/xDatabase/Examples/Sample_xDatabase.ps1
Sample_xDatabase.ps1
$assemblylist = "Microsoft.SqlServer.Dac.dll", "Microsoft.SqlServer.Smo.dll" $sqlpsreg110="HKLM:\SOFTWARE\Microsoft\PowerShell\1\ShellIds\Microsoft.SqlServer.Management.PowerShell.sqlps110" $sqlpsreg100="HKLM:\SOFTWARE\Microsoft\PowerShell\1\ShellIds\Microsoft.SqlServer.Management.PowerShell.sqlps" ...
PowerShellCorpus/PowerShellGallery/MVA_DSC_2015_DAY1/0.0.0.2/Scripts/Reskit9/All Resources/xExchange/xExchange/Test/Test-xExchange.ps1
Test-xExchange.ps1
[bool]$showValidSettings = $true [bool]$showVerbose = $true if ($shellCreds -eq $null) { $shellCreds = Get-Credential -Message "Enter credentials to use to connect to remote Exchange shell" } if ($certCreds -eq $null) { $certCreds = Get-Credential -Message "Enter credentials for importing certificat...
PowerShellCorpus/PowerShellGallery/MVA_DSC_2015_DAY1/0.0.0.2/Scripts/Reskit9/All Resources/xExchange/xExchange/Examples/ConfigureDatabases-FromCalculator/ConfigureDatabases-FromCalculator.ps1
ConfigureDatabases-FromCalculator.ps1
Configuration ConfigureDatabasesFromCalculator { param ( [PSCredential]$ShellCreds ) Import-DscResource -Module xExchange Import-Module "$((Get-Item -LiteralPath "$($PSScriptRoot)").Parent.FullName)\HelperScripts\ExchangeConfigHelper.psm1" Node $AllNodes.NodeName { ...
PowerShellCorpus/PowerShellGallery/MVA_DSC_2015_DAY1/0.0.0.2/Scripts/Reskit9/All Resources/xExchange/xExchange/Examples/QuickStartTemplate/QuickStartTemplate.ps1
QuickStartTemplate.ps1
Configuration QuickStartTemplate { param ( [PSCredential]$ShellCreds ) Import-DscResource -Module xExchange Node $AllNodes.NodeName { #Used when passing credentials securely. This configures the thumbprint of the #cert that will be used to decrypt the creds...
PowerShellCorpus/PowerShellGallery/MVA_DSC_2015_DAY1/0.0.0.2/Scripts/Reskit9/All Resources/xExchange/xExchange/Examples/PostInstallationConfiguration/PostInstallationConfiguration.ps1
PostInstallationConfiguration.ps1
Configuration PostInstallationConfiguration { param ( [PSCredential]$ShellCreds, [PSCredential]$CertCreds ) Import-DscResource -Module xExchange #This script shows examples of how to utilize most resources in the xExchange module. #Where possible, configuration setti...
PowerShellCorpus/PowerShellGallery/MVA_DSC_2015_DAY1/0.0.0.2/Scripts/Reskit9/All Resources/xExchange/xExchange/Examples/ConfigureAutoMountPoints-Manual/ConfigureAutoMountPoints-Manual.ps1
ConfigureAutoMountPoints-Manual.ps1
###See the following blog post for information on how to use this example: ###http://blogs.technet.com/b/mhendric/archive/2014/10/27/managing-exchange-2013-with-dsc-part-3-automating-mount-point-setup-and-maintenance-for-autoreseed.aspx Configuration ConfigureAutoMountPointsManual { Import-DscResource -Module...
PowerShellCorpus/PowerShellGallery/MVA_DSC_2015_DAY1/0.0.0.2/Scripts/Reskit9/All Resources/xExchange/xExchange/Examples/CreateAndConfigureDAG/CreateAndConfigureDAG.ps1
CreateAndConfigureDAG.ps1
Configuration CreateAndConfigureDAG { param ( [PSCredential]$ShellCreds ) Import-DscResource -Module xExchange Node $AllNodes.NodeName { #Thumbprint of the certificate used to decrypt credentials on the target node LocalConfigurationManager { ...
PowerShellCorpus/PowerShellGallery/MVA_DSC_2015_DAY1/0.0.0.2/Scripts/Reskit9/All Resources/xExchange/xExchange/Examples/InstallExchange/InstallExchange.ps1
InstallExchange.ps1
Configuration InstallExchange { param ( [PSCredential]$Creds ) Import-DscResource -Module xExchange Import-DscResource -Module xPendingReboot Node $AllNodes.NodeName { LocalConfigurationManager { CertificateId = $Node.Thumbprint ...
PowerShellCorpus/PowerShellGallery/MVA_DSC_2015_DAY1/0.0.0.2/Scripts/Reskit9/All Resources/xExchange/xExchange/Examples/WaitForADPrep/WaitForADPrep.ps1
WaitForADPrep.ps1
Configuration WaitForADPrep { param ( [PSCredential]$Creds ) Import-DscResource -Module xExchange Node $AllNodes.NodeName { LocalConfigurationManager { CertificateId = $Node.Thumbprint } xExchWaitForADPrep WaitForADPrep ...
PowerShellCorpus/PowerShellGallery/MVA_DSC_2015_DAY1/0.0.0.2/Scripts/Reskit9/All Resources/xExchange/xExchange/Examples/JetstressAutomation/1-InstallAndRunJetstress.ps1
1-InstallAndRunJetstress.ps1
Configuration InstallAndRunJetstress { Import-DscResource -Module xExchange Node $AllNodes.NodeName { #Create mount points for use with Jetstress. Here I prefer to use the same database names for ALL servers, #that way I can use the same JetstressConfig.xml for all of them. xExchAutoMou...
PowerShellCorpus/PowerShellGallery/MVA_DSC_2015_DAY1/0.0.0.2/Scripts/Reskit9/All Resources/xExchange/xExchange/Examples/JetstressAutomation/2-CleanupJetstress.ps1
2-CleanupJetstress.ps1
Configuration CleanupJetstress { Import-DscResource -Module xExchange Node $AllNodes.NodeName { LocalConfigurationManager { RebootNodeIfNeeded = $true } #Uninstall Jetstress from the computer Package UninstallJetstress { Ensur...
PowerShellCorpus/PowerShellGallery/MVA_DSC_2015_DAY1/0.0.0.2/Scripts/Reskit9/All Resources/xExchange/xExchange/Examples/ConfigureDatabases-Manual/ConfigureDatabases-Manual.ps1
ConfigureDatabases-Manual.ps1
Configuration ConfigureDatabasesManual { param ( [PSCredential]$ShellCreds ) Import-DscResource -Module xExchange Node $AllNodes.NodeName { #Thumbprint of the certificate used to decrypt credentials on the target node LocalConfigurationManager { ...
PowerShellCorpus/PowerShellGallery/MVA_DSC_2015_DAY1/0.0.0.2/Scripts/Reskit9/All Resources/xExchange/xExchange/Examples/ConfigureVirtualDirectories/ConfigureVirtualDirectories.ps1
ConfigureVirtualDirectories.ps1
Configuration ConfigureVirtualDirectories { param ( [PSCredential]$ShellCreds ) Import-DscResource -Module xExchange Node $AllNodes.NodeName { $casSettings = $ConfigurationData[$Node.CASId] #Look up and retrieve the CAS settings for this node #Thumbprint o...
PowerShellCorpus/PowerShellGallery/MVA_DSC_2015_DAY1/0.0.0.2/Scripts/Reskit9/All Resources/xExchange/xExchange/Examples/ConfigureNamespaces/RegionalNamespaces/RegionalNamespaces.ps1
RegionalNamespaces.ps1
Configuration RegionalNamespaces { param ( [PSCredential]$ShellCreds ) Import-DscResource -Module xExchange Node $AllNodes.NodeName { $casSettings = $ConfigurationData[$Node.CASId] #Look up and retrieve the CAS settings for this node #Thumbprint of the cer...
PowerShellCorpus/PowerShellGallery/MVA_DSC_2015_DAY1/0.0.0.2/Scripts/Reskit9/All Resources/xExchange/xExchange/Examples/ConfigureNamespaces/InternetFacingSite/InternetFacingSite.ps1
InternetFacingSite.ps1
Configuration InternetFacingSite { param ( [PSCredential]$ShellCreds ) Import-DscResource -Module xExchange Node $AllNodes.NodeName { $casSettings = $ConfigurationData[$Node.CASId] #Look up and retrieve the CAS settings for this node #Thumbprint of the cer...
PowerShellCorpus/PowerShellGallery/MVA_DSC_2015_DAY1/0.0.0.2/Scripts/Reskit9/All Resources/xExchange/xExchange/Examples/ConfigureNamespaces/SingleNamespace/SingleNamespace.ps1
SingleNamespace.ps1
Configuration SingleNamespace { param ( [PSCredential]$ShellCreds ) Import-DscResource -Module xExchange Node $AllNodes.NodeName { #Thumbprint of the certificate used to decrypt credentials on the target node LocalConfigurationManager { ...
PowerShellCorpus/PowerShellGallery/MVA_DSC_2015_DAY1/0.0.0.2/Scripts/Reskit9/All Resources/xExchange/Test/Test-xExchange.ps1
Test-xExchange.ps1
[bool]$showValidSettings = $true [bool]$showVerbose = $true if ($shellCreds -eq $null) { $shellCreds = Get-Credential -Message "Enter credentials to use to connect to remote Exchange shell" } if ($certCreds -eq $null) { $certCreds = Get-Credential -Message "Enter credentials for importing certificat...
PowerShellCorpus/PowerShellGallery/MVA_DSC_2015_DAY1/0.0.0.2/Scripts/Reskit9/All Resources/xExchange/Examples/ConfigureDatabases-FromCalculator/ConfigureDatabases-FromCalculator.ps1
ConfigureDatabases-FromCalculator.ps1
Configuration ConfigureDatabasesFromCalculator { param ( [PSCredential]$ShellCreds ) Import-DscResource -Module xExchange Import-Module "$((Get-Item -LiteralPath "$($PSScriptRoot)").Parent.FullName)\HelperScripts\ExchangeConfigHelper.psm1" Node $AllNodes.NodeName { ...
PowerShellCorpus/PowerShellGallery/MVA_DSC_2015_DAY1/0.0.0.2/Scripts/Reskit9/All Resources/xExchange/Examples/QuickStartTemplate/QuickStartTemplate.ps1
QuickStartTemplate.ps1
Configuration QuickStartTemplate { param ( [PSCredential]$ShellCreds ) Import-DscResource -Module xExchange Node $AllNodes.NodeName { #Used when passing credentials securely. This configures the thumbprint of the #cert that will be used to decrypt the creds...
PowerShellCorpus/PowerShellGallery/MVA_DSC_2015_DAY1/0.0.0.2/Scripts/Reskit9/All Resources/xExchange/Examples/PostInstallationConfiguration/PostInstallationConfiguration.ps1
PostInstallationConfiguration.ps1
Configuration PostInstallationConfiguration { param ( [PSCredential]$ShellCreds, [PSCredential]$CertCreds ) Import-DscResource -Module xExchange #This script shows examples of how to utilize most resources in the xExchange module. #Where possible, configuration setti...
PowerShellCorpus/PowerShellGallery/MVA_DSC_2015_DAY1/0.0.0.2/Scripts/Reskit9/All Resources/xExchange/Examples/ConfigureAutoMountPoints-Manual/ConfigureAutoMountPoints-Manual.ps1
ConfigureAutoMountPoints-Manual.ps1
###See the following blog post for information on how to use this example: ###http://blogs.technet.com/b/mhendric/archive/2014/10/27/managing-exchange-2013-with-dsc-part-3-automating-mount-point-setup-and-maintenance-for-autoreseed.aspx Configuration ConfigureAutoMountPointsManual { Import-DscResource -Module...
PowerShellCorpus/PowerShellGallery/MVA_DSC_2015_DAY1/0.0.0.2/Scripts/Reskit9/All Resources/xExchange/Examples/ConfigureAutoMountPoint-FromCalculator/ConfigureAutoMountPoints-FromCalculator.ps1
ConfigureAutoMountPoints-FromCalculator.ps1
###See the following blog post for information on how to use this example: ###http://blogs.technet.com/b/mhendric/archive/2014/10/27/managing-exchange-2013-with-dsc-part-3-automating-mount-point-setup-and-maintenance-for-autoreseed.aspx Configuration ConfigureAutoMountPointsFromCalculator { Import-DscResource...
PowerShellCorpus/PowerShellGallery/MVA_DSC_2015_DAY1/0.0.0.2/Scripts/Reskit9/All Resources/xExchange/Examples/CreateAndConfigureDAG/CreateAndConfigureDAG.ps1
CreateAndConfigureDAG.ps1
Configuration CreateAndConfigureDAG { param ( [PSCredential]$ShellCreds ) Import-DscResource -Module xExchange Node $AllNodes.NodeName { #Thumbprint of the certificate used to decrypt credentials on the target node LocalConfigurationManager { ...
PowerShellCorpus/PowerShellGallery/MVA_DSC_2015_DAY1/0.0.0.2/Scripts/Reskit9/All Resources/xExchange/Examples/InstallExchange/InstallExchange.ps1
InstallExchange.ps1
Configuration InstallExchange { param ( [PSCredential]$Creds ) Import-DscResource -Module xExchange Import-DscResource -Module xPendingReboot Node $AllNodes.NodeName { LocalConfigurationManager { CertificateId = $Node.Thumbprint ...
PowerShellCorpus/PowerShellGallery/MVA_DSC_2015_DAY1/0.0.0.2/Scripts/Reskit9/All Resources/xExchange/Examples/WaitForADPrep/WaitForADPrep.ps1
WaitForADPrep.ps1
Configuration WaitForADPrep { param ( [PSCredential]$Creds ) Import-DscResource -Module xExchange Node $AllNodes.NodeName { LocalConfigurationManager { CertificateId = $Node.Thumbprint } xExchWaitForADPrep WaitForADPrep ...
PowerShellCorpus/PowerShellGallery/MVA_DSC_2015_DAY1/0.0.0.2/Scripts/Reskit9/All Resources/xExchange/Examples/JetstressAutomation/1-InstallAndRunJetstress.ps1
1-InstallAndRunJetstress.ps1
Configuration InstallAndRunJetstress { Import-DscResource -Module xExchange Node $AllNodes.NodeName { #Create mount points for use with Jetstress. Here I prefer to use the same database names for ALL servers, #that way I can use the same JetstressConfig.xml for all of them. xExchAutoMou...
PowerShellCorpus/PowerShellGallery/MVA_DSC_2015_DAY1/0.0.0.2/Scripts/Reskit9/All Resources/xExchange/Examples/JetstressAutomation/2-CleanupJetstress.ps1
2-CleanupJetstress.ps1
Configuration CleanupJetstress { Import-DscResource -Module xExchange Node $AllNodes.NodeName { LocalConfigurationManager { RebootNodeIfNeeded = $true } #Uninstall Jetstress from the computer Package UninstallJetstress { Ensur...
PowerShellCorpus/PowerShellGallery/MVA_DSC_2015_DAY1/0.0.0.2/Scripts/Reskit9/All Resources/xExchange/Examples/ConfigureDatabases-Manual/ConfigureDatabases-Manual.ps1
ConfigureDatabases-Manual.ps1
Configuration ConfigureDatabasesManual { param ( [PSCredential]$ShellCreds ) Import-DscResource -Module xExchange Node $AllNodes.NodeName { #Thumbprint of the certificate used to decrypt credentials on the target node LocalConfigurationManager { ...
PowerShellCorpus/PowerShellGallery/MVA_DSC_2015_DAY1/0.0.0.2/Scripts/Reskit9/All Resources/xExchange/Examples/ConfigureVirtualDirectories/ConfigureVirtualDirectories.ps1
ConfigureVirtualDirectories.ps1
Configuration ConfigureVirtualDirectories { param ( [PSCredential]$ShellCreds ) Import-DscResource -Module xExchange Node $AllNodes.NodeName { $casSettings = $ConfigurationData[$Node.CASId] #Look up and retrieve the CAS settings for this node #Thumbprint o...
PowerShellCorpus/PowerShellGallery/MVA_DSC_2015_DAY1/0.0.0.2/Scripts/Reskit9/All Resources/xExchange/Examples/ConfigureNamespaces/RegionalNamespaces/RegionalNamespaces.ps1
RegionalNamespaces.ps1
Configuration RegionalNamespaces { param ( [PSCredential]$ShellCreds ) Import-DscResource -Module xExchange Node $AllNodes.NodeName { $casSettings = $ConfigurationData[$Node.CASId] #Look up and retrieve the CAS settings for this node #Thumbprint of the cer...
PowerShellCorpus/PowerShellGallery/MVA_DSC_2015_DAY1/0.0.0.2/Scripts/Reskit9/All Resources/xExchange/Examples/ConfigureNamespaces/InternetFacingSite/InternetFacingSite.ps1
InternetFacingSite.ps1
Configuration InternetFacingSite { param ( [PSCredential]$ShellCreds ) Import-DscResource -Module xExchange Node $AllNodes.NodeName { $casSettings = $ConfigurationData[$Node.CASId] #Look up and retrieve the CAS settings for this node #Thumbprint of the cer...
PowerShellCorpus/PowerShellGallery/MVA_DSC_2015_DAY1/0.0.0.2/Scripts/Reskit9/All Resources/xExchange/Examples/ConfigureNamespaces/SingleNamespace/SingleNamespace.ps1
SingleNamespace.ps1
Configuration SingleNamespace { param ( [PSCredential]$ShellCreds ) Import-DscResource -Module xExchange Node $AllNodes.NodeName { #Thumbprint of the certificate used to decrypt credentials on the target node LocalConfigurationManager { ...
PowerShellCorpus/PowerShellGallery/MVA_DSC_2015_DAY1/0.0.0.2/Scripts/Reskit9/All Resources/xDhcpServer/Misc/New-DhcpServerOptionResource.ps1
New-DhcpServerOptionResource.ps1
$Properties = @{ DnsServer = New-xDscResourceProperty -Name DnsServerIPAddress -Type String[] -Attribute Required ` -Description 'IP address of DNS Servers' DnsDomain = New-xDscResourceProperty -Name DnsDomain -Type String -Attribute Write ` ...
PowerShellCorpus/PowerShellGallery/MVA_DSC_2015_DAY1/0.0.0.2/Scripts/Reskit9/All Resources/xDhcpServer/Misc/New-DhcpServerScopeResource.ps1
New-DhcpServerScopeResource.ps1
$Properties = @{ ScopeID = New-xDscResourceProperty -Name ScopeID -Type String -Attribute Read ` -Description 'ScopeId for which properties are set' Name = New-xDscResourceProperty -Name Name -Type String -Attribute Required ` ...
PowerShellCorpus/PowerShellGallery/MVA_DSC_2015_DAY1/0.0.0.2/Scripts/Reskit9/All Resources/xDhcpServer/Misc/New-DhcpServerReservationResource.ps1
New-DhcpServerReservationResource.ps1
$Properties = @{ ScopeID = New-xDscResourceProperty -Name ScopeID -Type String -Attribute Key ` -Description 'ScopeId for which reservations are set' IPAddress = New-xDscResourceProperty -Name IPAddress -Type String -Attribute Required ` ...
PowerShellCorpus/PowerShellGallery/MVA_DSC_2015_DAY1/0.0.0.2/Scripts/Reskit9/All Resources/xDnsServer/Misc/New-DnsServerSecondaryZone.ps1
New-DnsServerSecondaryZone.ps1
$Properties = @{ Name = New-xDscResourceProperty -Name Name -Type String -Attribute Key ` -Description 'Name of the secondary zone' DnsServer = New-xDscResourceProperty -Name MasterServerIPAddress -Type String[] -Attribute Requ...
PowerShellCorpus/PowerShellGallery/MVA_DSC_2015_DAY1/0.0.0.2/Scripts/Reskit9/All Resources/xDnsServer/Misc/New-DnsServerZoneTransfer.ps1
New-DnsServerZoneTransfer.ps1
$Properties = @{ Name = New-xDscResourceProperty -Name Name -Type String -Attribute Key ` -Description 'Name of the secondary zone' Type = New-xDscResourceProperty -Name Type -Type String -Attribute Required -ValidateSet 'Any',...
PowerShellCorpus/PowerShellGallery/MVA_DSC_2015_DAY1/0.0.0.2/Scripts/Reskit9/All Resources/xSCSMA/Examples/SCSMA-SingleServer-TP.ps1
SCSMA-SingleServer-TP.ps1
#requires -Version 5 Configuration SMA { Import-DscResource -Module xSQLServer Import-DscResource -Module xSCSMA # Set role and instance variables $Roles = $AllNodes.Roles | Sort-Object -Unique foreach($Role in $Roles) { $Servers = @($AllNodes.Where{$_.Roles | Where-Object {...
PowerShellCorpus/PowerShellGallery/MVA_DSC_2015_DAY1/0.0.0.2/Scripts/Reskit9/All Resources/xSCSMA/Examples/SCSMA-SeperateSQL-TP.ps1
SCSMA-SeperateSQL-TP.ps1
#requires -Version 5 Configuration SMA { Import-DscResource -Module xSQLServer Import-DscResource -Module xSCSMA # Set role and instance variables $Roles = $AllNodes.Roles | Sort-Object -Unique foreach($Role in $Roles) { $Servers = @($AllNodes.Where{$_.Roles | Where-Object {...
PowerShellCorpus/PowerShellGallery/MVA_DSC_2015_DAY1/0.0.0.2/Scripts/Reskit9/All Resources/xSCSMA/Examples/SCSMA-SeperateSQL.ps1
SCSMA-SeperateSQL.ps1
#requires -Version 5 Configuration SMA { Import-DscResource -Module xSQLServer Import-DscResource -Module xSCSMA # Set role and instance variables $Roles = $AllNodes.Roles | Sort-Object -Unique foreach($Role in $Roles) { $Servers = @($AllNodes.Where{$_.Roles | Where-Object {...
PowerShellCorpus/PowerShellGallery/MVA_DSC_2015_DAY1/0.0.0.2/Scripts/Reskit9/All Resources/xSCSMA/Examples/SCSMA-MultiInstance.ps1
SCSMA-MultiInstance.ps1
#requires -Version 5 Configuration SMA { Import-DscResource -Module xSQLServer Import-DscResource -Module xSCSMA # Set role and instance variables $Roles = $AllNodes.Roles | Sort-Object -Unique foreach($Role in $Roles) { $Servers = @($AllNodes.Where{$_.Roles | Where-Object {...
PowerShellCorpus/PowerShellGallery/MVA_DSC_2015_DAY1/0.0.0.2/Scripts/Reskit9/All Resources/xSCSMA/Examples/SCSMA-SingleServer.ps1
SCSMA-SingleServer.ps1
#requires -Version 5 Configuration SMA { Import-DscResource -Module xSQLServer Import-DscResource -Module xSCSMA # Set role and instance variables $Roles = $AllNodes.Roles | Sort-Object -Unique foreach($Role in $Roles) { $Servers = @($AllNodes.Where{$_.Roles | Where-Object {...
PowerShellCorpus/PowerShellGallery/MVA_DSC_2015_DAY1/0.0.0.2/Scripts/Reskit9/All Resources/xSCSMA/Examples/SCSMA-MultiInstance-TP.ps1
SCSMA-MultiInstance-TP.ps1
#requires -Version 5 Configuration SMA { Import-DscResource -Module xSQLServer Import-DscResource -Module xSCSMA # Set role and instance variables $Roles = $AllNodes.Roles | Sort-Object -Unique foreach($Role in $Roles) { $Servers = @($AllNodes.Where{$_.Roles | Where-Object {...
PowerShellCorpus/PowerShellGallery/MVA_DSC_2015_DAY1/0.0.0.2/Scripts/Reskit9/All Resources/xFirefox/Example/Sample_xFirefox.ps1
Sample_xFirefox.ps1
#Installs the specified version of Firefox in the specified language. Configuration Sample_InstallFirefoxBrowser { param ( [Parameter(Mandatory)] $VersionNumber, [Parameter(Mandatory)] $Language, [Parameter(Mandatory)] $OS, [Parameter(Mandatory)] $LocalPath ...
PowerShellCorpus/PowerShellGallery/MVA_DSC_2015_DAY1/0.0.0.2/Scripts/Reskit9/All Resources/xChrome/Example/Sample_xChrome.ps1
Sample_xChrome.ps1
#Installs the latest version of Chrome in the language specified in the parameter Language. Configuration Sample_InstallChromeBrowser { param ( [Parameter(Mandatory)] $Language, [Parameter(Mandatory)] $LocalPath ) Import-DscResource -module xChrome MSFT_xChrome chrome ...
PowerShellCorpus/PowerShellGallery/MVA_DSC_2015_DAY1/0.0.0.2/Scripts/Reskit9/All Resources/xPhp/Samples/InstallRequiredModules.ps1
InstallRequiredModules.ps1
# This Script installs the required modules for the Php Sample # It uses the PowerShell Resource Gallery, see https://msconfiggallery.cloudapp.net/ # This requires WMF 5. If you don't have WMF 5, Please install the modules manually. Write-Host "Installing required modules..." Install-Module xWebAdministration -M...
PowerShellCorpus/PowerShellGallery/MVA_DSC_2015_DAY1/0.0.0.2/Scripts/Reskit9/All Resources/xPhp/Samples/UsingxPhpCompositeConfiguration.ps1
UsingxPhpCompositeConfiguration.ps1
# This configuration will, via the xPHP composite configuration: # 1) Make sure IIS is installed # 2) Make sure PHP is present # 3) Make sure that PHP is registered with IIS # 4) Make sure PHP is in the path # # ********* NOTE *********** # PHP changes their download URLs frequently. Please verify the URL. # t...
PowerShellCorpus/PowerShellGallery/MVA_DSC_2015_DAY1/0.0.0.2/Scripts/Reskit9/All Resources/xSCSR/Examples/SCSR-SingleServer.ps1
SCSR-SingleServer.ps1
#requires -Version 5 Configuration SR { Import-DscResource -Module xSQLServer Import-DscResource -Module xSCSR # Set role and instance variables $Roles = $AllNodes.Roles | Sort-Object -Unique foreach($Role in $Roles) { $Servers = @($AllNodes.Where{$_.Roles | Where-Object {$_...
PowerShellCorpus/PowerShellGallery/MVA_DSC_2015_DAY1/0.0.0.2/Scripts/Reskit9/All Resources/xSCSR/Examples/SCSR-SeperateSQL.ps1
SCSR-SeperateSQL.ps1
#requires -Version 5 Configuration SR { Import-DscResource -Module xSQLServer Import-DscResource -Module xSCSR # Set role and instance variables $Roles = $AllNodes.Roles | Sort-Object -Unique foreach($Role in $Roles) { $Servers = @($AllNodes.Where{$_.Roles | Where-Object {$_...
PowerShellCorpus/PowerShellGallery/MVA_DSC_2015_DAY1/0.0.0.2/Scripts/Reskit9/All Resources/xSCSR/Examples/SCSR-SingleServer-TP.ps1
SCSR-SingleServer-TP.ps1
#requires -Version 5 Configuration SR { Import-DscResource -Module xSQLServer Import-DscResource -Module xSCSR # Set role and instance variables $Roles = $AllNodes.Roles | Sort-Object -Unique foreach($Role in $Roles) { $Servers = @($AllNodes.Where{$_.Roles | Where-Object {$_...
PowerShellCorpus/PowerShellGallery/MVA_DSC_2015_DAY1/0.0.0.2/Scripts/Reskit9/All Resources/xSCSR/Examples/SCSR-SeperateSQL-TP.ps1
SCSR-SeperateSQL-TP.ps1
#requires -Version 5 Configuration SR { Import-DscResource -Module xSQLServer Import-DscResource -Module xSCSR # Set role and instance variables $Roles = $AllNodes.Roles | Sort-Object -Unique foreach($Role in $Roles) { $Servers = @($AllNodes.Where{$_.Roles | Where-Object {$_...
PowerShellCorpus/PowerShellGallery/MVA_DSC_2015_DAY1/0.0.0.2/Scripts/Reskit9/All Resources/xJea/Examples/Demo1.ps1
Demo1.ps1
cls configuration Demo1 { Import-DscResource -module xjea xJeaToolKit Process { Name = 'Process' CommandSpecs = @" Name,Parameter,ValidateSet,ValidatePattern Get-Process Get-Service Stop-Process,Name,calc;notepad Restart-Service,Name,,^A "@ } xJeaEndPoint D...
PowerShellCorpus/PowerShellGallery/MVA_DSC_2015_DAY1/0.0.0.2/Scripts/Reskit9/All Resources/xJea/Examples/SetupJea.ps1
SetupJea.ps1
Configuration SetupJea { Import-DscResource -module xjea Node localhost { xJeaEndPoint CleanAll { Name = 'CleanALL' CleanAll = $true } LocalConfigurationManager { RefreshFrequencyMins = 30 Configuratio...
PowerShellCorpus/PowerShellGallery/MVA_DSC_2015_DAY1/0.0.0.2/Scripts/Reskit9/All Resources/xJea/Examples/Demo2.ps1
Demo2.ps1
cls configuration Demo2 { Import-DscResource -module xjea xJeaToolKit SMBGet { Name = 'SMBGet' CommandSpecs = @" Module,Name,Parameter,ValidateSet,ValidatePattern SMBShare,get-* "@ } xJeaEndPoint Demo2EP { Name = 'Demo2EP' ...
PowerShellCorpus/PowerShellGallery/MVA_DSC_2015_DAY1/0.0.0.2/Scripts/Reskit9/All Resources/xJea/Examples/Demo3.ps1
Demo3.ps1
cls configuration Demo3 { Import-DscResource -module xjea xJeaToolKit FileSystem { Name = 'FileSystem' CommandSpecs = @" Module,name,Parameter,ValidateSet,ValidatePattern ,Get-ChildItem ,Get-Item ,Copy-Item ,Move-Item ,Rename-Item ,Remove-Item ,Copy-ItemProperty ,Clea...
PowerShellCorpus/PowerShellGallery/MVA_DSC_2015_DAY1/0.0.0.2/Scripts/Reskit9/All Resources/xJea/Util/Initialize-ToolKit.ps1
Initialize-ToolKit.ps1
# Copyright ゥ 2014, Microsoft Corporation. All rights reserved. #InitializeToolKit param( [ValidateNotNullOrEmpty()] $ToolkitName ) ipmo (Join-Path $env:ProgramFiles 'Jea\Util\SafeProxy.psm1') -DisableNameChecking function Write-ActivityRecord { $JeaDir = Join-Path $env:ProgramFiles 'Je...
PowerShellCorpus/PowerShellGallery/MVA_DSC_2015_DAY1/0.0.0.2/Scripts/Reskit9/All Resources/xSCSPF/Examples/SCSPF-MultiInstance.ps1
SCSPF-MultiInstance.ps1
#requires -Version 5 Configuration SPF { Import-DscResource -Module xSQLServer Import-DscResource -Module xSCVMM Import-DscResource -Module xSCSPF # Set role and instance variables $Roles = $AllNodes.Roles | Sort-Object -Unique foreach($Role in $Roles) { $Servers = @($A...
PowerShellCorpus/PowerShellGallery/MVA_DSC_2015_DAY1/0.0.0.2/Scripts/Reskit9/All Resources/xSCSPF/Examples/SCSPF-SeperateSQL.ps1
SCSPF-SeperateSQL.ps1
#requires -Version 5 Configuration SPF { Import-DscResource -Module xSQLServer Import-DscResource -Module xSCVMM Import-DscResource -Module xSCSPF # Set role and instance variables $Roles = $AllNodes.Roles | Sort-Object -Unique foreach($Role in $Roles) { $Servers = @($A...
PowerShellCorpus/PowerShellGallery/MVA_DSC_2015_DAY1/0.0.0.2/Scripts/Reskit9/All Resources/xSCSPF/Examples/SCSPF-MultiInstance-TP.ps1
SCSPF-MultiInstance-TP.ps1
#requires -Version 5 Configuration SPF { Import-DscResource -Module xSQLServer Import-DscResource -Module xSCVMM Import-DscResource -Module xSCSPF # Set role and instance variables $Roles = $AllNodes.Roles | Sort-Object -Unique foreach($Role in $Roles) { $Servers = @($A...
PowerShellCorpus/PowerShellGallery/MVA_DSC_2015_DAY1/0.0.0.2/Scripts/Reskit9/All Resources/xSCSPF/Examples/SCSPF-SeperateSQL-TP.ps1
SCSPF-SeperateSQL-TP.ps1
#requires -Version 5 Configuration SPF { Import-DscResource -Module xSQLServer Import-DscResource -Module xSCVMM Import-DscResource -Module xSCSPF # Set role and instance variables $Roles = $AllNodes.Roles | Sort-Object -Unique foreach($Role in $Roles) { $Servers = @($A...
PowerShellCorpus/PowerShellGallery/MVA_DSC_2015_DAY1/0.0.0.2/Scripts/Reskit9/All Resources/xSCSPF/Examples/SCSPF-SingleServer-TP.ps1
SCSPF-SingleServer-TP.ps1
#requires -Version 5 Configuration SPF { Import-DscResource -Module xSQLServer Import-DscResource -Module xSCVMM Import-DscResource -Module xSCSPF # Set role and instance variables $Roles = $AllNodes.Roles | Sort-Object -Unique foreach($Role in $Roles) { $Servers = @($A...
PowerShellCorpus/PowerShellGallery/MVA_DSC_2015_DAY1/0.0.0.2/Scripts/Reskit9/All Resources/xSCSPF/Examples/SCSPF-SingleServer.ps1
SCSPF-SingleServer.ps1
#requires -Version 5 Configuration SPF { Import-DscResource -Module xSQLServer Import-DscResource -Module xSCVMM Import-DscResource -Module xSCSPF # Set role and instance variables $Roles = $AllNodes.Roles | Sort-Object -Unique foreach($Role in $Roles) { $Servers = @($A...
PowerShellCorpus/PowerShellGallery/MVA_DSC_2015_DAY1/0.0.0.2/Scripts/Reskit9/All Resources/xPSDesiredStateConfiguration/DSCResources/MSFT_xPackageResource/Examples/Sample_InstallMSI_xPackage.ps1
Sample_InstallMSI_xPackage.ps1
<# Simple installer for an msi package that matches via the Name. #> param ( [String]$OutputPath = ".", [parameter(Mandatory = $true)] [ValidateNotNullOrEmpty()] [String] $PackageName, [parameter(Mandatory = $true)] [ValidateNotNullOrEmpty()] [String] $SourcePath ) Conf...
PowerShellCorpus/PowerShellGallery/MVA_DSC_2015_DAY1/0.0.0.2/Scripts/Reskit9/All Resources/xPSDesiredStateConfiguration/DSCResources/MSFT_xServiceResource/Samples/Sample_xService_DeleteService.ps1
Sample_xService_DeleteService.ps1
Configuration Sample_xService_DeleteService { param ( [string[]] $nodeName = 'localhost', [System.String] $Name, [System.String] [ValidateSet("Automatic", "Manual", "Disabled")] $StartupType, [System.String] [Validate...
PowerShellCorpus/PowerShellGallery/MVA_DSC_2015_DAY1/0.0.0.2/Scripts/Reskit9/All Resources/xPSDesiredStateConfiguration/DSCResources/MSFT_xServiceResource/Samples/Sample_xService_CreateService.ps1
Sample_xService_CreateService.ps1
Configuration Sample_xService_CreateService { param ( [string[]] $nodeName = 'localhost', [System.String] $Name, [System.String] [ValidateSet("Automatic", "Manual", "Disabled")] $StartupType="Automatic", [System.String] ...
PowerShellCorpus/PowerShellGallery/MVA_DSC_2015_DAY1/0.0.0.2/Scripts/Reskit9/All Resources/xPSDesiredStateConfiguration/Examples/Test_Sample_xArchive_CompressMultipleDirs.ps1
Test_Sample_xArchive_CompressMultipleDirs.ps1
$zipFilePath = "$pwd\Target.zip" del "$pwd\SourceDir-1" -Force -Recurse -ErrorAction SilentlyContinue del "$pwd\SourceDir-2" -Force -Recurse -ErrorAction SilentlyContinue New-Item $pwd\SourceDir-1 -Type Directory | Out-Null New-Item $pwd\SourceDir-1\Sample-1.txt -Type File | Out-Null New-Item $pwd\SourceDir-...
PowerShellCorpus/PowerShellGallery/MVA_DSC_2015_DAY1/0.0.0.2/Scripts/Reskit9/All Resources/xPSDesiredStateConfiguration/Examples/Test_Sample_xArchive_ExpandArchive.ps1
Test_Sample_xArchive_ExpandArchive.ps1
$zipFilePath = "$pwd\SampleArchive.zip" $expandedZipDir = "$pwd\TargetExpanded" del "$pwd\SourceDir" -Force -Recurse -ErrorAction SilentlyContinue del "$zipFilePath" -Force -Recurse -ErrorAction SilentlyContinue New-Item $pwd\SourceDir -Type Directory | Out-Null New-Item $pwd\SourceDir\Sample-1.txt -Type Fil...
PowerShellCorpus/PowerShellGallery/MVA_DSC_2015_DAY1/0.0.0.2/Scripts/Reskit9/All Resources/xPSDesiredStateConfiguration/Examples/Sample_xService_DeleteService.ps1
Sample_xService_DeleteService.ps1
Configuration Sample_xService_DeleteService { param ( [string[]] $nodeName = 'localhost', [System.String] $Name, [System.String] [ValidateSet("Automatic", "Manual", "Disabled")] $StartupType, [System.String] [Validate...
PowerShellCorpus/PowerShellGallery/MVA_DSC_2015_DAY1/0.0.0.2/Scripts/Reskit9/All Resources/xPSDesiredStateConfiguration/Examples/Sample_xArchive_CompressArchive.ps1
Sample_xArchive_CompressArchive.ps1
Configuration Sample_xArchive_CompressArchive { param ( [parameter(mandatory=$true)] [ValidateNotNullOrEmpty()] [string[]] $Path, [parameter (mandatory=$true)] [ValidateNotNullOrEmpty()] [string] $Destination, [parameter (mandatory=$false...
PowerShellCorpus/PowerShellGallery/MVA_DSC_2015_DAY1/0.0.0.2/Scripts/Reskit9/All Resources/xPSDesiredStateConfiguration/Examples/Sample_xWindowsProcess_EnsureAbsentWithCredential.ps1
Sample_xWindowsProcess_EnsureAbsentWithCredential.ps1
Configuration Sample_xWindowsProcess_EnsureAbsentWithCredential { param ( [pscredential]$cred = (Get-Credential) ) Import-DSCResource -ModuleName xPSDesiredStateConfiguration Node localhost { xWindowsProcess Notepad { Path = "C:\Windows\System32\Not...
PowerShellCorpus/PowerShellGallery/MVA_DSC_2015_DAY1/0.0.0.2/Scripts/Reskit9/All Resources/xPSDesiredStateConfiguration/Examples/Sample_xRemoteFile.ps1
Sample_xRemoteFile.ps1
configuration Sample_xRemoteFile_DownloadFile { param ( [string[]] $nodeName = 'localhost', [parameter(Mandatory = $true)] [ValidateNotNullOrEmpty()] [String] $destinationPath, [parameter(Mandatory = $true)] [ValidateNotNullOrEmpty()] [String...
PowerShellCorpus/PowerShellGallery/MVA_DSC_2015_DAY1/0.0.0.2/Scripts/Reskit9/All Resources/xPSDesiredStateConfiguration/Examples/Sample_xService_ServiceWithCredential.ps1
Sample_xService_ServiceWithCredential.ps1
Configuration Sample_xService_ServiceWithCredential { param ( [string[]] $nodeName = 'localhost', [System.String] $Name, [System.String] [ValidateSet("Automatic", "Manual", "Disabled")] $StartupType="Automatic", [System.String...
PowerShellCorpus/PowerShellGallery/MVA_DSC_2015_DAY1/0.0.0.2/Scripts/Reskit9/All Resources/xPSDesiredStateConfiguration/Examples/Sample_xWindowsProcess_ArgumentsWithCredential.ps1
Sample_xWindowsProcess_ArgumentsWithCredential.ps1
Configuration Sample_xWindowsProcess_ArgumentsWithCredential { param ( [pscredential]$cred = (Get-Credential) ) Import-DSCResource -ModuleName xPSDesiredStateConfiguration Node localhost { xWindowsProcess powershell { Path = "C:\Windows\System32\Win...
PowerShellCorpus/PowerShellGallery/MVA_DSC_2015_DAY1/0.0.0.2/Scripts/Reskit9/All Resources/xPSDesiredStateConfiguration/Examples/Sample_xService_CreateService.ps1
Sample_xService_CreateService.ps1
Configuration Sample_xService_CreateService { param ( [string[]] $nodeName = 'localhost', [System.String] $Name, [System.String] [ValidateSet("Automatic", "Manual", "Disabled")] $StartupType="Automatic", [System.String] ...
PowerShellCorpus/PowerShellGallery/MVA_DSC_2015_DAY1/0.0.0.2/Scripts/Reskit9/All Resources/xPSDesiredStateConfiguration/Examples/Sample_xDscWebService.ps1
Sample_xDscWebService.ps1
# DSC configuration for Pull Server and Compliance Server # Prerequisite: Certificate "CN=PSDSCPullServerCert" in "CERT:\LocalMachine\MY\" store # Note: A Certificate may be generated using MakeCert.exe: http://msdn.microsoft.com/en-us/library/windows/desktop/aa386968%28v=vs.85%29.aspx configuration Sample_xDscWeb...
PowerShellCorpus/PowerShellGallery/MVA_DSC_2015_DAY1/0.0.0.2/Scripts/Reskit9/All Resources/xPSDesiredStateConfiguration/Examples/Sample_xWindowsProcess_WithCredential.ps1
Sample_xWindowsProcess_WithCredential.ps1
Configuration Sample_xWindowsProcess_WithCredential { param ( [pscredential]$cred = (Get-Credential) ) Import-DSCResource -ModuleName xPSDesiredStateConfiguration Node localhost { xWindowsProcess Notepad { Path = "C:\Windows\System32\Notepad.exe" ...
PowerShellCorpus/PowerShellGallery/MVA_DSC_2015_DAY1/0.0.0.2/Scripts/Reskit9/All Resources/xPSDesiredStateConfiguration/Examples/Sample_xArchive_CompressMultipleDirs.ps1
Sample_xArchive_CompressMultipleDirs.ps1
Configuration Sample_xArchive_CompressMultipleDirs { param ( [parameter(mandatory=$true)] [ValidateNotNullOrEmpty()] [string[]] $Path, [parameter (mandatory=$true)] [ValidateNotNullOrEmpty()] [string] $Destination, [parameter (mandatory=$...
PowerShellCorpus/PowerShellGallery/MVA_DSC_2015_DAY1/0.0.0.2/Scripts/Reskit9/All Resources/xPSDesiredStateConfiguration/Examples/Sample_xArchive_ExpandArchive.ps1
Sample_xArchive_ExpandArchive.ps1
Configuration Sample_xArchive_ExpandArchive { param ( [parameter(mandatory=$true)] [ValidateNotNullOrEmpty()] [string[]] $Path, [parameter (mandatory=$true)] [ValidateNotNullOrEmpty()] [string] $Destination, [parameter (mandatory=$false)]...
PowerShellCorpus/PowerShellGallery/MVA_DSC_2015_DAY1/0.0.0.2/Scripts/Reskit9/All Resources/xPSDesiredStateConfiguration/Examples/Sample_xPSSessionConfiguration.ps1
Sample_xPSSessionConfiguration.ps1
configuration Sample_xPSEndpoint_NewWithDefaults { param ( [Parameter(Mandatory)] [String]$Name ) Import-DscResource -module xPSDesiredStateConfiguration xPSEndpoint PSSessionConfiguration { Name = $Name Ensure = 'Present' } } configuration...
PowerShellCorpus/PowerShellGallery/MVA_DSC_2015_DAY1/0.0.0.2/Scripts/Reskit9/All Resources/xPSDesiredStateConfiguration/Examples/Test_Sample_xArchive_CompressArchive.ps1
Test_Sample_xArchive_CompressArchive.ps1
$zipFilePath = "$pwd\Target.zip" del "$pwd\Sample-1.txt" -Force -Recurse -ErrorAction SilentlyContinue del "$pwd\Sample-2.txt" -Force -Recurse -ErrorAction SilentlyContinue del "$pwd\Sample-3.txt" -Force -Recurse -ErrorAction SilentlyContinue del "$pwd\SourceDir-1" -Force -Recurse -ErrorAction SilentlyContinue ...