full_path stringlengths 31 232 | filename stringlengths 4 167 | content stringlengths 0 48.3M |
|---|---|---|
PowerShellCorpus/Github/zniezelski_Printerceptor/isolate.ps1 | isolate.ps1 | Import-Module PSTerminalServices
$Printers = Get-WmiObject -Class Win32_Printer | where {$_.parameters -ne $Null}
$Connected = get-tssession | where {(($_.State -eq "Active") -and ($_.WindowStationName -ne "Console"))}
if ($Connected.count -le 0) {
New-PSDrive -Name HKLM -PSProvider Registry -Root Registry::H... |
PowerShellCorpus/Github/OPSTest_E2E_Provision_1488243940338/.openpublishing.build.ps1 | .openpublishing.build.ps1 | param(
[string]$buildCorePowershellUrl = "https://opbuildstoragesandbox2.blob.core.windows.net/opps1container/.openpublishing.buildcore.ps1",
[string]$parameters
)
# Main
$errorActionPreference = 'Stop'
# Step-1: Download buildcore script to local
echo "download build core script to local with source u... |
PowerShellCorpus/Github/morganjohnston_AzureVmScheduler/StopVms.ps1 | StopVms.ps1 | workflow StopVMs
{
param (
[Parameter(Mandatory=$true)]
[string[]]
$VmNames
)
$cred = Get-AutomationPSCredential -Name "AccountCredentials"
Add-AzureAccount -Credential $cred
foreach ($name in $VmNames)
{
Stop-AzureVM -Name $name -ServiceName ... |
PowerShellCorpus/Github/morganjohnston_AzureVmScheduler/StartVms.ps1 | StartVms.ps1 | workflow StartVMs
{
param (
[Parameter(Mandatory=$true)]
[string[]]
$VmNames
)
# Only start VMs on weekdays
$day = (Get-Date).DayOfWeek
if ($day -eq 'Saturday' -or $day -eq 'Sunday'){
exit
}
$cred = Get-AutomationPSCredential -Name "Accoun... |
PowerShellCorpus/Github/morganjohnston_AzureVmScheduler/AzureVmScheduler.ps1 | AzureVmScheduler.ps1 | Param(
[string]$subscriptionId = $(throw "-subscriptionId is required. Get this from the Azure portal."),
[object[]]$vmNames = $(throw "-vmNames is required. It requires a comma separated list of VM name strings."),
[int]$startHour = 7,
[int]$stopHour = 19
)
$startTime = [DateTime]::Now.Date.AddDays(1... |
PowerShellCorpus/Github/svendewindt_azure/MasterSmall2016/MasterSmall2016/Deploy-AzureResourceGroup.ps1 | Deploy-AzureResourceGroup.ps1 | #Requires -Version 3.0
#Requires -Module AzureRM.Resources
#Requires -Module Azure.Storage
Param(
[string] [Parameter(Mandatory=$true)] $ResourceGroupLocation,
[string] $ResourceGroupName = 'MasterSmall2016',
[switch] $UploadArtifacts,
[string] $StorageAccountName,
[string] $StorageContain... |
PowerShellCorpus/Github/svendewindt_azure/MasterSmall2016/MasterSmall2016/CustomScripts/DeployRDS.ps1 | DeployRDS.ps1 | param(
[parameter(mandatory)][String]$fqdnRDSBroker,
[parameter(mandatory)][String]$fqdnRDSWebAccess,
[parameter(mandatory)][String]$fqdnRDSHost,
[parameter(mandatory)][String]$log
)
function tryPsRemoting{
param(
[parameter(mandatory)][String]$server,
... |
PowerShellCorpus/Github/svendewindt_azure/MasterSmall2016/MasterSmall2016/CustomScripts/startOrchestration.ps1 | startOrchestration.ps1 | <# Custom Script for Windows #>
param(
[parameter(mandatory)][String]$RDSBroker,
[parameter(mandatory)][String]$RDSWebAccess,
[parameter(mandatory)][String]$RDSHost
)
Set-StrictMode -Version 3.0
#Getting required modules/scripts
#Get Logging.psm1 in the modules folder
... |
PowerShellCorpus/Github/svendewindt_azure/MasterSmall2016/MasterSmall2016/DSC/configureDC.ps1 | configureDC.ps1 |
configuration configureDC{
param(
[String]$nodeName = "localhost",
[Parameter(mandatory)][System.Management.Automation.PSCredential]$Admincreds,
[Parameter(mandatory)][String]$domainName
)
Import-DscResource -module xNetworking, xActiveDirectory, xPendingReboot
... |
PowerShellCorpus/Github/svendewindt_azure/MasterSmall2016/MasterSmall2016/Scripts/Deploy-AzureResourceGroup.ps1 | Deploy-AzureResourceGroup.ps1 | #Requires -Version 3.0
#Requires -Module AzureRM.Resources
#Requires -Module Azure.Storage
Param(
[string] [Parameter(Mandatory=$true)] $ResourceGroupLocation,
[string] $ResourceGroupName = 'MasterSmall',
[switch] $UploadArtifacts,
[string] $StorageAccountName,
[string] $StorageAccountReso... |
PowerShellCorpus/Github/svendewindt_azure/MasterSmall/CustomScripts/DeployRDS.ps1 | DeployRDS.ps1 | param(
[parameter(mandatory)][String]$fqdnRDSBroker,
[parameter(mandatory)][String]$fqdnRDSWebAccess,
[parameter(mandatory)][String]$fqdnRDSHost,
[parameter(mandatory)][String]$log
)
function tryPsRemoting{
param(
[parameter(mandatory)][String]$server,
... |
PowerShellCorpus/Github/svendewindt_azure/MasterSmall/CustomScripts/startOrchestration.ps1 | startOrchestration.ps1 | <# Custom Script for Windows #>
param(
[parameter(mandatory)][String]$RDSBroker,
[parameter(mandatory)][String]$RDSWebAccess,
[parameter(mandatory)][String]$RDSHost
)
Set-StrictMode -Version 3.0
#Getting required modules/scripts
#Get Logging.psm1 in the modules folder
... |
PowerShellCorpus/Github/svendewindt_azure/MasterSmall/Scripts/Deploy-AzureResourceGroup.ps1 | Deploy-AzureResourceGroup.ps1 | #Requires -Version 3.0
#Requires -Module AzureRM.Resources
#Requires -Module Azure.Storage
Param(
[string] [Parameter(Mandatory=$true)] $ResourceGroupLocation,
[string] $ResourceGroupName = 'MasterSmall',
[switch] $UploadArtifacts,
[string] $StorageAccountName,
[string] $StorageAccountReso... |
PowerShellCorpus/Github/svendewindt_azure/MasterAxTest/AzureDeploy/Deploy-AzureResourceGroup.ps1 | Deploy-AzureResourceGroup.ps1 | #Requires -Version 3.0
#Requires -Module AzureRM.Resources
#Requires -Module Azure.Storage
Param(
[string] [Parameter(Mandatory=$true)] $ResourceGroupLocation,
[string] $ResourceGroupName = 'MasterAxTest',
[switch] $UploadArtifacts,
[string] $StorageAccountName,
[string] $StorageContainerN... |
PowerShellCorpus/Github/svendewindt_azure/MasterAxTest/AzureDeploy/CustomScripts/DeployRDS.ps1 | DeployRDS.ps1 | param(
[parameter(mandatory)][String]$fqdnRDSBroker,
[parameter(mandatory)][String]$fqdnRDSWebAccess,
[parameter(mandatory)][String]$fqdnRDSHost,
[parameter(mandatory)][String]$log
)
function tryPsRemoting{
param(
[parameter(mandatory)][String]$server,
... |
PowerShellCorpus/Github/svendewindt_azure/MasterAxTest/AzureDeploy/CustomScripts/startOrchestration.ps1 | startOrchestration.ps1 | <# Custom Script for Windows #>
param(
[parameter(mandatory)][String]$RDSBroker,
[parameter(mandatory)][String]$RDSWebAccess,
[parameter(mandatory)][String]$RDSHost
)
Set-StrictMode -Version 3.0
#Getting required modules/scripts
#Get Logging.psm1 in the modules folder
... |
PowerShellCorpus/Github/svendewindt_azure/MasterAxTest/AzureDeploy/DSC/configureSQL.ps1 | configureSQL.ps1 | Configuration configureSQL
{
param(
[String]$nodeName = "localhost"
)
Import-DscResource -moduleName cdisk, xdisk, PSDesiredStateConfiguration
Node $nodeName{
LocalConfigurationManager
{
RebootNodeIfNeeded = $true
}
xWaitforDis... |
PowerShellCorpus/Github/svendewindt_azure/MasterAxTest/AzureDeploy/DSC/configureRDS.ps1 | configureRDS.ps1 | configuration configureRDS
{
param(
[String]$nodeName = "localhost",
[Parameter(mandatory)][String]$domainName,
[Parameter(mandatory)][System.Management.Automation.PSCredential]$Admincreds
)
[System.Management.Automation.PSCredential ]$DomainCreds = New-Object Syst... |
PowerShellCorpus/Github/svendewindt_azure/MasterAxTest/AzureDeploy/DSC/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/Github/svendewindt_azure/MasterAxTest/AzureDeploy/DSC/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/Github/svendewindt_azure/MasterAxTest/AzureDeploy/DSC/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/Github/svendewindt_azure/MasterAxTest/AzureDeploy/DSC/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/Github/svendewindt_azure/MasterAxTest/AzureDeploy/DSC/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/Github/svendewindt_azure/MasterAxTest/AzureDeploy/DSC/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/Github/svendewindt_azure/MasterAxTest/AzureDeploy/DSC/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/Github/svendewindt_azure/MasterAxTest/AzureDeploy/DSC/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/Github/svendewindt_azure/MasterAxTest/AzureDeploy/DSC/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/Github/svendewindt_azure/MasterAxTest/AzureDeploy/DSC/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/Github/svendewindt_azure/MasterAxTest/AzureDeploy/DSC/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/Github/svendewindt_azure/MasterAxTest/AzureDeploy/DSC/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/Github/svendewindt_azure/MasterAxTest/AzureDeploy/DSC/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/Github/svendewindt_azure/MasterAxTest/AzureDeploy/DSC/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/Github/svendewindt_azure/MasterAxTest/AzureDeploy/DSC/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/Github/svendewindt_azure/MasterAxTest/AzureDeploy/DSC/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/Github/svendewindt_azure/MasterAxTest/AzureDeploy/DSC/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/Github/svendewindt_azure/MasterAxTest/AzureDeploy/DSC/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/Github/svendewindt_azure/MasterAxTest/AzureDeploy/DSC/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/Github/svendewindt_azure/MasterAxTest/AzureDeploy/DSC/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/Github/svendewindt_azure/MasterAxTest/AzureDeploy/DSC/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/Github/svendewindt_azure/MasterAxTest/AzureDeploy/DSC/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/Github/svendewindt_azure/MasterAxTest/AzureDeploy/DSC/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/Github/svendewindt_azure/MasterAxTest/AzureDeploy/DSC/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/Github/svendewindt_azure/MasterAxTest/AzureDeploy/DSC/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/Github/svendewindt_azure/MasterAxTest/AzureDeploy/DSC/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/Github/svendewindt_azure/MasterAxTest/AzureDeploy/DSC/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/Github/svendewindt_azure/MasterAxTest/AzureDeploy/DSC/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/Github/svendewindt_azure/MasterAxTest/AzureDeploy/DSC/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/Github/svendewindt_azure/MasterAxTest/AzureDeploy/DSC/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/Github/svendewindt_azure/MasterAxTest/AzureDeploy/DSC/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/Github/svendewindt_azure/MasterAxTest/AzureDeploy/DSC/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/Github/svendewindt_azure/MasterAxTest/AzureDeploy/DSC/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/Github/svendewindt_azure/MasterAxTest/AzureDeploy/DSC/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/Github/svendewindt_azure/MasterAxTest/AzureDeploy/DSC/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/Github/svendewindt_azure/MasterAxTest/AzureDeploy/DSC/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/Github/svendewindt_azure/MasterAxTest/AzureDeploy/DSC/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/Github/svendewindt_azure/MasterAxTest/AzureDeploy/DSC/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/Github/svendewindt_azure/MasterAxTest/AzureDeploy/DSC/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/Github/svendewindt_azure/MasterAxTest/AzureDeploy/DSC/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/Github/svendewindt_azure/MasterAxTest/AzureDeploy/DSC/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/Github/svendewindt_azure/MasterAxTest/AzureDeploy/DSC/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/Github/svendewindt_azure/MasterAxTest/AzureDeploy/DSC/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/Github/svendewindt_azure/MasterAxTest/AzureDeploy/DSC/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/Github/svendewindt_azure/MasterAxTest/AzureDeploy/DSC/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/Github/svendewindt_azure/MasterAxTest/AzureDeploy/DSC/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/Github/svendewindt_azure/MasterAxTest/AzureDeploy/DSC/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/Github/svendewindt_azure/MasterAxTest/AzureDeploy/DSC/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/Github/svendewindt_azure/MasterAxTest/AzureDeploy/DSC/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/Github/svendewindt_azure/MasterAxTest/AzureDeploy/DSC/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/Github/svendewindt_azure/MasterAxTest/AzureDeploy/DSC/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/Github/svendewindt_azure/MasterAxTest/AzureDeploy/DSC/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/Github/svendewindt_azure/MasterAxTest/AzureDeploy/DSC/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/Github/svendewindt_azure/MasterAxTest/AzureDeploy/DSC/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/Github/svendewindt_azure/MasterAxTest/AzureDeploy/DSC/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/Github/svendewindt_azure/MasterAxTest/AzureDeploy/DSC/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/Github/svendewindt_azure/MasterAxTest/AzureDeploy/DSC/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/Github/svendewindt_azure/MasterAxTest/AzureDeploy/DSC/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/Github/svendewindt_azure/MasterAxTest/AzureDeploy/DSC/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/Github/svendewindt_azure/MasterAxTest/AzureDeploy/DSC/All Resources/xPSDesiredStateConfiguration/DSCResources/MSFT_xPackageResource/Examples/Sample_InstallMSIProductId_xPackage.ps1 | Sample_InstallMSIProductId_xPackage.ps1 | <#
Simple installer that installs an msi package and matches based on the product id.
#>
param
(
[String]$OutputPath = ".",
[parameter(Mandatory = $true)]
[ValidateNotNullOrEmpty()]
[String] $PackageName,
[parameter(Mandatory = $true)]
[ValidateNotNullOrEmpty()]
[String] $S... |
PowerShellCorpus/Github/svendewindt_azure/MasterAxTest/AzureDeploy/DSC/All Resources/xPSDesiredStateConfiguration/DSCResources/MSFT_xPackageResource/Examples/Sample_InstallExeCreds_xPackage.ps1 | Sample_InstallExeCreds_xPackage.ps1 | <#
Simple package that installs an .exe using credentials to access the installer and specifying RunAs Credentials.
#>
param
(
[String]$OutputPath = ".",
[parameter(Mandatory = $true)]
[ValidateNotNullOrEmpty()]
[String] $PackageName,
[parameter(Mandatory = $true)]
[ValidateNo... |
PowerShellCorpus/Github/svendewindt_azure/MasterAxTest/AzureDeploy/DSC/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/Github/svendewindt_azure/MasterAxTest/AzureDeploy/DSC/All Resources/xPSDesiredStateConfiguration/DSCResources/MSFT_xPackageResource/Examples/Sample_InstallExeCredsRegistry_xPackage.ps1 | Sample_InstallExeCredsRegistry_xPackage.ps1 | <#
Simple package that installs an .exe using credentials to access the installer and specifying RunAs Credentials.
This sample also uses custom registry data to discover the package.
#>
param
(
[String]$OutputPath = ".",
[parameter(Mandatory = $true)]
[ValidateNotNullOrEmpty()]
[String] $... |
PowerShellCorpus/Github/svendewindt_azure/MasterAxTest/AzureDeploy/DSC/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/Github/svendewindt_azure/MasterAxTest/AzureDeploy/DSC/All Resources/xPSDesiredStateConfiguration/DSCResources/MSFT_xServiceResource/Samples/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/Github/svendewindt_azure/MasterAxTest/AzureDeploy/DSC/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/Github/svendewindt_azure/MasterAxTest/AzureDeploy/DSC/All Resources/xPSDesiredStateConfiguration/DSCResources/MSFT_xProcessResource/Samples/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/Github/svendewindt_azure/MasterAxTest/AzureDeploy/DSC/All Resources/xPSDesiredStateConfiguration/DSCResources/MSFT_xProcessResource/Samples/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/Github/svendewindt_azure/MasterAxTest/AzureDeploy/DSC/All Resources/xPSDesiredStateConfiguration/DSCResources/MSFT_xProcessResource/Samples/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/Github/svendewindt_azure/MasterAxTest/AzureDeploy/DSC/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/Github/svendewindt_azure/MasterAxTest/AzureDeploy/DSC/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/Github/svendewindt_azure/MasterAxTest/AzureDeploy/DSC/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/Github/svendewindt_azure/MasterAxTest/AzureDeploy/DSC/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/Github/svendewindt_azure/MasterAxTest/AzureDeploy/DSC/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/Github/svendewindt_azure/MasterAxTest/AzureDeploy/DSC/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/Github/svendewindt_azure/MasterAxTest/AzureDeploy/DSC/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/Github/svendewindt_azure/MasterAxTest/AzureDeploy/DSC/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/Github/svendewindt_azure/MasterAxTest/AzureDeploy/DSC/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/Github/svendewindt_azure/MasterAxTest/AzureDeploy/DSC/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/Github/svendewindt_azure/MasterAxTest/AzureDeploy/DSC/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/Github/svendewindt_azure/MasterAxTest/AzureDeploy/DSC/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/Github/svendewindt_azure/MasterAxTest/AzureDeploy/DSC/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)]... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.