full_path
stringlengths
31
232
filename
stringlengths
4
167
content
stringlengths
0
48.3M
PowerShellCorpus/PowerShellGallery/WinFormPS/1.0.0/Public/Import-WFDataGridView.ps1
Import-WFDataGridView.ps1
function Import-WFDataGridView { <# .SYNOPSIS This functions helps you load items into a DataGridView. .DESCRIPTION Use this function to dynamically load items into the DataGridView control. .PARAMETER DataGridView The ComboBox control you want to add items to. .PARAMETER Item The object ...
PowerShellCorpus/PowerShellGallery/WinFormPS/1.0.0/Public/Disable-WFTabControl.ps1
Disable-WFTabControl.ps1
function Disable-WFTabControl { <# .SYNOPSIS This function will disable a tab control .DESCRIPTION A detailed description of the Disable-WFTabControl function. .PARAMETER TabControl Specifies the TabControl control to disable .EXAMPLE Disable-WFTabControl -TabControl $TabControl .NOT...
PowerShellCorpus/PowerShellGallery/WinFormPS/1.0.0/Public/Set-WFForm.ps1
Set-WFForm.ps1
function Set-WFForm { <# .SYNOPSIS The Set-WFForm function is used to change the properties of a Form or to intract with it .DESCRIPTION The Set-WFForm function is used to change the properties of a Form or to intract with it .PARAMETER Form Specifies the Form control .PARAMETER Text Spec...
PowerShellCorpus/PowerShellGallery/WinFormPS/1.0.0/Public/Remove-WFListBoxItem.ps1
Remove-WFListBoxItem.ps1
function Remove-WFListBoxItem { <# .SYNOPSIS Function to remove item(s) from a ListBox Control .DESCRIPTION Function to remove item(s) from a ListBox Control .PARAMETER ListBox Specifies the ListBox control .PARAMETER All Specifies that you want to remove all the item .PARAMETER Patt...
PowerShellCorpus/PowerShellGallery/WinFormPS/1.0.0/Public/Reset-WFDataGridViewFormat.ps1
Reset-WFDataGridViewFormat.ps1
function Reset-WFDataGridViewFormat { <# .SYNOPSIS The Reset-DataGridViewFormat function will reset the format of a datagridview control .DESCRIPTION The Reset-DataGridViewFormat function will reset the format of a datagridview control .PARAMETER DataGridView Specifies the DataGridView Control. ...
PowerShellCorpus/PowerShellGallery/WinFormPS/1.0.0/Public/Enable-WFTextBox.ps1
Enable-WFTextBox.ps1
function Enable-WFTextBox { <# .SYNOPSIS This function will enable a TextBox control .DESCRIPTION This function will enable a TextBox control .PARAMETER TextBox Specifies the TextBox control to enable .EXAMPLE Enable-WFTextBox -TextBox $TextBox .NOTES Francois-Xavier Cat @lazyw...
PowerShellCorpus/PowerShellGallery/WinFormPS/1.0.0/Public/Add-WFListViewItem.ps1
Add-WFListViewItem.ps1
function Add-WFListViewItem { <# .SYNOPSIS Adds the item(s) to the ListView and stores the object in the ListViewItem's Tag property. .DESCRIPTION Adds the item(s) to the ListView and stores the object in the ListViewItem's Tag property. .PARAMETER ListView The ListView control to add the items to....
PowerShellCorpus/PowerShellGallery/WinFormPS/1.0.0/Public/Set-WFDataGridView.ps1
Set-WFDataGridView.ps1
function Set-WFDataGridView { <# .SYNOPSIS This function helps you edit the datagridview control .DESCRIPTION This function helps you edit the datagridview control .PARAMETER DataGridView Specifies the DataGridView Control .PARAMETER AlternativeRowColor Specifies the color of the alternat...
PowerShellCorpus/PowerShellGallery/WinFormPS/1.0.0/Public/Clear-WFListBox.ps1
Clear-WFListBox.ps1
function Clear-WFListBox { <# .SYNOPSIS This function will clear the content of a listbox control .DESCRIPTION This function will clear the content of a listbox control .PARAMETER ListBox Specifies the ListBox control to clear .EXAMPLE Clear-WFListBox -ListBox $ListBox .NOTES Fran...
PowerShellCorpus/PowerShellGallery/WinFormPS/1.0.0/Public/Set-WFDataGridViewFilter.ps1
Set-WFDataGridViewFilter.ps1
function Set-WFDataGridViewFilter { <# .SYNOPSIS The function Set-WFDataGridViewFilter helps to only show specific entries with a specific value .DESCRIPTION The function Set-WFDataGridViewFilter helps to only show specific entries with a specific value. The data needs to be in a DataTable Object. You...
PowerShellCorpus/PowerShellGallery/WinFormPS/1.0.0/Public/ConvertTo-WFDataTable.ps1
ConvertTo-WFDataTable.ps1
function ConvertTo-WFDataTable { <# .SYNOPSIS Converts objects into a DataTable. .DESCRIPTION Converts objects into a DataTable, which are used for DataBinding. .PARAMETER InputObject The input to convert into a DataTable. .PARAMETER Table The DataTable you wish to load the inp...
PowerShellCorpus/PowerShellGallery/WinFormPS/1.0.0/Public/Set-WFListViewColumn.ps1
Set-WFListViewColumn.ps1
function Set-WFListViewColumn { <# .SYNOPSIS Sort the ListView's item using the specified column. .DESCRIPTION Sort the ListView's item using the specified column. This function uses Add-Type to define a class that sort the items. The ListView's Tag property is used to keep track of the sorting. ...
PowerShellCorpus/PowerShellGallery/WinFormPS/1.0.0/Public/Clear-WFDataGridViewSelection.ps1
Clear-WFDataGridViewSelection.ps1
function Clear-WFDataGridViewSelection { <# .SYNOPSIS The Clear-WFDataGridViewSelection function will deselect any cell, row, column selection. .DESCRIPTION The Clear-WFDataGridViewSelection function will deselect any cell, row, column selection. .PARAMETER DataGridView Specifies the DataGridView...
PowerShellCorpus/PowerShellGallery/WinFormPS/1.0.0/Public/Get-WFForm.ps1
Get-WFForm.ps1
function Get-WFForm { <# .SYNOPSIS Function to retrieve information about the a Form .DESCRIPTION Function to retrieve information about the a Form .PARAMETER Form Specifies the Form .PARAMETER Controls Specifies that you want to see all the controls in the form .PARAMETER TabIndex ...
PowerShellCorpus/PowerShellGallery/WinFormPS/1.0.0/Public/New-WFSpeakerBeep.ps1
New-WFSpeakerBeep.ps1
function New-WFSpeakerBeep { <# .SYNOPSIS The New-WFSpeakerBeep function plays the sound of a beep of a specified frequency and duration through the console speaker. .DESCRIPTION The New-WFSpeakerBeep function plays the sound of a beep of a specified frequency and duration through the console speaker. ...
PowerShellCorpus/PowerShellGallery/WinFormPS/1.0.0/Public/Add-WFRichTextBoxText.ps1
Add-WFRichTextBoxText.ps1
function Add-WFRichTextBoxText { <# .SYNOPSIS This function Append text to a RichTextBox .DESCRIPTION This function Append text to a RichTextBox .PARAMETER Richtextbox Specify the RichTextBox Control to use .PARAMETER Message Specify the Message to show .PARAMETER MessageColor Spec...
PowerShellCorpus/PowerShellGallery/DscResourceCommonTests/0.3.0.0/Meta.Tests.ps1
Meta.Tests.ps1
<# .summary Test that describes code. .PARAMETER Force Used to force any installations to occur without confirming with the user. #> [CmdletBinding()] Param ( [Boolean]$Force = $false ) if (!$PSScriptRoot) # $PSScriptRoot is not defined in 2.0 { $PSScriptRoot = ...
PowerShellCorpus/PowerShellGallery/ServiceManager/0.1/Examples/dsc_configuration.ps1
dsc_configuration.ps1
configuration default { Import-DscResource -Name WindowsService -ModuleName ServiceManager WindowsService wuauserv { Name = 'wuauserv' State = 'Stopped' StartupType = 'Manual' } }
PowerShellCorpus/PowerShellGallery/ServiceManager/0.1/Tests/ServiceHelper.Tests.ps1
ServiceHelper.Tests.ps1
$here = Split-Path -Parent $MyInvocation.MyCommand.Path $sut = (Split-Path -Leaf $MyInvocation.MyCommand.Path).Replace(".Tests.", ".") . "$here\$sut" $script:TestService = 'wuauserv' Describe -Name 'Service Test() Tests' -Tags 'Test' -Fixture { BeforeAll {Set-Service $script:TestService -StartupType Manu...
PowerShellCorpus/PowerShellGallery/ServiceManager/0.1/Tests/ServiceHelper.ps1
ServiceHelper.ps1
$here = Split-Path -Parent $MyInvocation.MyCommand.Path Import-Module "$here\..\ServiceManager.psm1" -Force
PowerShellCorpus/PowerShellGallery/ServiceManager/0.1/Tests/Integration/default/WindowsService.Tests.ps1
WindowsService.Tests.ps1
Describe 'WindowsService Integration Tests' { $Name = 'wuauserv' It 'Test service state' { $s = Get-Service $Name $s.Status -eq 'Stopped' | should be $true } It 'Test service startuptype' { $s = Get-CimInstance -ClassName 'win32_service' -Filter "Name='$Name'" ...
PowerShellCorpus/PowerShellGallery/Nupkg/1.0.6.304/functions/internal.ps1
internal.ps1
function sort-frameworks([Parameter(ValueFromPipeline=$true)] $frameworks, $frameworkhint) { begin { $ordered = @() } process { $order = switch($_.name) { $frameworkhint { 0; break } {$_ -match "^net" } { 10; break } {$_ -match "^dnx" } { 20; break } default { 100; break } }...
PowerShellCorpus/PowerShellGallery/Nupkg/1.0.6.304/functions/choco-utils.ps1
choco-utils.ps1
# taken from chocolatey function Get-PackageFoldersForPackage { param( [string]$packageName = '', $packagesDir ) return Get-ChildItem $packagesDir | ?{$_.name -match "^$packageName\.\d+"} } function Get-LongPackageVersion { param( [string] $packageVersion = '' ) $longVersion = $packageVersion.Split('-')[0]....
PowerShellCorpus/PowerShellGallery/Nupkg/1.0.6.304/functions/nuget-helpers.ps1
nuget-helpers.ps1
function find-packagesdir { [CmdletBinding()] param ($path, [switch][bool]$all) if ($path -eq $null) { $path = "." } $result = @() if (!(get-item $path).PsIsContainer) { $dir = split-path -Parent (get-item $path).fullname } else { $dir = (get-i...
PowerShellCorpus/PowerShellGallery/PPoShTools/1.0.3/Private/Help/Escape-Markdown.ps1
Escape-Markdown.ps1
function Escape-Markdown { <# .SYNOPSIS Escapes special characters for markdown. .PARAMETER String String to escape. .EXAMPLE Escape-Markdown -String '<test>' #> [CmdletBinding()] [OutputType([void])] param( [Parameter(Mandatory=$true)] [string] $St...
PowerShellCorpus/PowerShellGallery/PPoShTools/1.0.3/Private/Help/Generate-MarkdownForFunction.ps1
Generate-MarkdownForFunction.ps1
function Generate-MarkdownForFunction { <# .SYNOPSIS Generates markdown for specified function. .PARAMETER FunctionInfo FunctionInfo object as created by Get-AllFunctionsFrom* function. .PARAMETER OutputIndexString String builder for index markdown. .PARAMETER ModuleName Name of t...
PowerShellCorpus/PowerShellGallery/PPoShTools/1.0.3/Private/Help/Get-HelpAllFunctionsFromDirectory.ps1
Get-HelpAllFunctionsFromDirectory.ps1
function Get-HelpAllFunctionsFromDirectory { <# .SYNOPSIS Gets all functions from given directory. .PARAMETER Path Path to directory. .EXAMPLE $functionsToDocument = Get-HelpAllFunctionsFromDirectory -Path 'c:\MyModule' #> [Diagnostics.CodeAnalysis.SuppressMessageAttribute('PSAvoid...
PowerShellCorpus/PowerShellGallery/PPoShTools/1.0.3/Private/Help/Get-HelpAllFunctionsFromModule.ps1
Get-HelpAllFunctionsFromModule.ps1
function Get-HelpAllFunctionsFromModule { <# .SYNOPSIS Gets all public functions from given module. .PARAMETER ModulePath Module path. .PARAMETER ModuleName Module name. .EXAMPLE $functionsToDocument = Get-HelpAllFunctionsFromModule -ModulePath $ModulePath -ModuleName $ModuleName ...
PowerShellCorpus/PowerShellGallery/PPoShTools/1.0.3/Private/Log/Write-LogToStdOut.ps1
Write-LogToStdOut.ps1
function Write-LogToStdOut() { <# .SYNOPSIS Outputs the Message to stdout using colors. .EXAMPLE Write-LogToStdOut -Header "Header" -Message "Message" -Severity $Severity #> [CmdletBinding()] [OutputType([void])] [Diagnostics.CodeAnalysis.SuppressMessageAttribute('PSAv...
PowerShellCorpus/PowerShellGallery/PPoShTools/1.0.3/Private/Log/Write-LogToPSOutput.ps1
Write-LogToPSOutput.ps1
function Write-LogToPSOutput() { <# .SYNOPSIS Outputs the Message using Write-Output function. Helper function. .EXAMPLE Write-LogToPSOutput -Header "Header" -Message "Message" #> [CmdletBinding()] [OutputType([void])] param( [string] $Header, ...
PowerShellCorpus/PowerShellGallery/PPoShTools/1.0.3/Private/Log/Write-LogToFile.ps1
Write-LogToFile.ps1
function Write-LogToFile() { <# .SYNOPSIS Outputs the Message to file. Helper function. .EXAMPLE Write-LogToFile -Header "Header" -Message "Message" -Severity $Severity #> [CmdletBinding()] [OutputType([void])] param( [Parameter(Mandatory=$false)] [string] ...
PowerShellCorpus/PowerShellGallery/PPoShTools/1.0.3/Private/Log/Write-LogToEventLog.ps1
Write-LogToEventLog.ps1
function Write-LogToEventLog() { <# .SYNOPSIS Outputs the Message to event log. .DESCRIPTION Creates new event log source if not exists. #> [CmdletBinding()] [OutputType([string])] [Diagnostics.CodeAnalysis.SuppressMessageAttribute('PSAvoidUsingWriteHost', '')] par...
PowerShellCorpus/PowerShellGallery/PPoShTools/1.0.3/Private/Log/Test-LogSeverity.ps1
Test-LogSeverity.ps1
function Test-LogSeverity() { <# .SYNOPSIS Checks if message severity is greater on equal to config severity. .EXAMPLE Test-LogSeverity -MessageSeverity #> [CmdletBinding()] [OutputType([bool])] param( [Parameter(Mandatory=$true)] [int] $M...
PowerShellCorpus/PowerShellGallery/PPoShTools/1.0.3/Private/Utils/Write-EventsToLog.ps1
Write-EventsToLog.ps1
function Write-EventsToLog { <# .SYNOPSIS Get logs from event. .DESCRIPTION Catches output from event for OutputDataSourceIdentifier (stdout) and ErrorDataSourceIdentifier (error) and writes proper logs. .OUTPUTS If event was generated for ErrorDataSourceIdentier then "StandardError" ...
PowerShellCorpus/PowerShellGallery/PPoShTools/1.0.3/Public/Help/New-MarkdownDoc.ps1
New-MarkdownDoc.ps1
function New-MarkdownDoc { <# .SYNOPSIS Generates markdown documentation for each public function from given module. .PARAMETER ModulePath Module to scan. .PARAMETER OutputPath Base output path. .PARAMETER GitBaseUrl Base Git url to generate links to source files. .EXAMPLE ...
PowerShellCorpus/PowerShellGallery/PPoShTools/1.0.3/Public/Log/Write-Log.ps1
Write-Log.ps1
Function Write-Log { <# .SYNOPSIS Writes a nicely formatted Message to stdout/file/event log. .DESCRIPTION It uses optional $LogConfiguration object which describes logging configuration (see LogConfiguration.ps1). It can be set using Set-LogConfiguration function. .INPUTS ...
PowerShellCorpus/PowerShellGallery/PPoShTools/1.0.3/Public/Log/Set-LogConfiguration.ps1
Set-LogConfiguration.ps1
Function Set-LogConfiguration { <# .SYNOPSIS Sets global logging configuation (used by Write-Log). .DESCRIPTION It sets $LogConfiguration object which describes logging configuration (see LogConfiguration.ps1). .EXAMPLE Set-LogConfiguration -LogLevel 'Warn' -LogFile "$PSScriptR...
PowerShellCorpus/PowerShellGallery/PPoShTools/1.0.3/Public/Log/Write-ErrorRecord.ps1
Write-ErrorRecord.ps1
function Write-ErrorRecord { <# .SYNOPSIS Logs ErrorRecord message, including script StackTrace and exception StackTrace. .EXAMPLE $Global:ErrorActionPreference = 'Stop' try { ... } catch { Write-ErrorRecord ...
PowerShellCorpus/PowerShellGallery/PPoShTools/1.0.3/Public/Csv/Test-ColumnIsValid.ps1
Test-ColumnIsValid.ps1
function Test-ColumnIsValid { <# .SYNOPSIS Validates a column value in a single CSV row. .DESCRIPTION It is useful in Get-CsvData / Get-ValidationRules to validate columns read from CSV row. It returns empty array if the value is valid, or array of error messages if it's invalid. .EXA...
PowerShellCorpus/PowerShellGallery/PPoShTools/1.0.3/Public/Csv/Get-CsvData.ps1
Get-CsvData.ps1
function Get-CsvData { <# .SYNOPSIS Reads CSV file using specific encoding and running optional Validation and Transformation rules. .DESCRIPTION After CSV file is read, Validation phase is run, that is for each row $CsvValidationRules scriptblock is invoked, which returns array of string:...
PowerShellCorpus/PowerShellGallery/PPoShTools/1.0.3/Public/Utils/Set-SimpleAcl.ps1
Set-SimpleAcl.ps1
function Set-SimpleAcl { <# .SYNOPSIS Sets a simple ACL rule for given Path. .DESCRIPTION Returns true if an access rule has been added. False if it was already present. .EXAMPLE Set-SimpleAcl -Path 'c:\test' -User 'Everyone' -Permission 'FullControl' -Type 'Allow' #> ...
PowerShellCorpus/PowerShellGallery/PPoShTools/1.0.3/Public/Utils/Stop-ProcessForcefully.ps1
Stop-ProcessForcefully.ps1
function Stop-ProcessForcefully { <# .SYNOPSIS Kills process forcefully along with its children. .EXAMPLE Stop-ProcessForcefully -Process $process #> [CmdletBinding()] [OutputType([void])] [Diagnostics.CodeAnalysis.SuppressMessageAttribute('PSAvoidUsingWMICmdlet', '')] ...
PowerShellCorpus/PowerShellGallery/PPoShTools/1.0.3/Public/Utils/Start-ExternalProcess.ps1
Start-ExternalProcess.ps1
function Start-ExternalProcess { <# .SYNOPSIS Runs external process. .DESCRIPTION Runs an external process with proper logging and error handling. It fails if anything is present in stderr stream or if exitcode is non-zero. .EXAMPLE Star...
PowerShellCorpus/PowerShellGallery/PPoShTools/1.0.3/Public/Utils/New-ConnectionParameters.ps1
New-ConnectionParameters.ps1
function New-ConnectionParameters { <# .SYNOPSIS Creates an universal connection parameters object that can be conveniently used for opening connections. .DESCRIPTION It returns following hashtable: ``` @{ Nodes = <array of nodes> NodesAsString = <nodes in string format> ...
PowerShellCorpus/PowerShellGallery/PPoShTools/1.0.3/Public/Utils/ConvertTo-Date.ps1
ConvertTo-Date.ps1
function ConvertTo-Date { <# .SYNOPSIS Converts a string to a DateTime using specified DateFormat. .DESCRIPTION See https://msdn.microsoft.com/en-us/library/az4se3k1%28v=vs.110%29.aspx for description of format strings. .EXAMPLE $date = ConvertTo-Date -String '2015-03-05' -DateFormat 'yyy...
PowerShellCorpus/PowerShellGallery/PPoShTools/1.0.3/Public/Utils/Convert-HashtableToString.ps1
Convert-HashtableToString.ps1
function Convert-HashtableToString { <# .SYNOPSIS Converts hashtable or any other dictionary to a serializable string. It also supports nested hashtables. .EXAMPLE Convert-HashtableToString -Hashtable @{'key' = 'value'; 'keyNested' = @{'a' = 'b'}} @{'key'='value'; 'keyNested'=@{'a'='b'; }...
PowerShellCorpus/PowerShellGallery/mlSqlPs/1.0.0.3/Samples/InstallSql.ps1
InstallSql.ps1
# Configuration to install Sql server database engine and management tools. # # A. Prepare a local self signed certificate with the following steps: # 1. Get MakeCert.exe if you don't have. ( MakeCert.exe is shipped with windows SDK: http://msdn.microsoft.com/en-us/windows/desktop/bg162891.aspx) # 2. Open console ...
PowerShellCorpus/PowerShellGallery/mlSqlPs/1.0.0.3/Samples/ConfigureSqlAlias.ps1
ConfigureSqlAlias.ps1
configuration ContosoSqlAliasConfig { param () Import-DscResource -ModuleName mlSqlPS; node $AllNodes.NodeName { LocalConfigurationManager { ConfigurationMode = 'ApplyAndMonitor'; RebootNodeIfNeeded = $true; } xSqlAlias...
PowerShellCorpus/PowerShellGallery/MVA_DSC_2015_DAY2/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_DAY2/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_DAY2/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_DAY2/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_DAY2/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_DAY2/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_DAY2/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_DAY2/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_DAY2/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_DAY2/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_DAY2/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_DAY2/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_DAY2/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_DAY2/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_DAY2/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_DAY2/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_DAY2/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_DAY2/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_DAY2/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_DAY2/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_DAY2/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_DAY2/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_DAY2/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_DAY2/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_DAY2/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_DAY2/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_DAY2/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_DAY2/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_DAY2/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_DAY2/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_DAY2/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_DAY2/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_DAY2/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_DAY2/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_DAY2/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_DAY2/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_DAY2/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_DAY2/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_DAY2/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_DAY2/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_DAY2/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_DAY2/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_DAY2/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_DAY2/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_DAY2/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_DAY2/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_DAY2/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_DAY2/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_DAY2/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_DAY2/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_DAY2/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_DAY2/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 {...