full_path stringlengths 31 232 | filename stringlengths 4 167 | content stringlengths 0 48.3M |
|---|---|---|
PowerShellCorpus/PowerShellGallery/SharePointDSC/1.7.0.0/Examples/Resources/SPSearchIndexPartition/1-Example.ps1 | 1-Example.ps1 | <#
.EXAMPLE
This example adds an extra search partition to the local farms topology
#>
Configuration Example
{
param(
[Parameter(Mandatory = $true)]
[PSCredential]
$SetupAccount
)
Import-DscResource -ModuleName SharePointDsc
... |
PowerShellCorpus/PowerShellGallery/SharePointDSC/1.7.0.0/Examples/Resources/SPUserProfileServiceAppPermissions/1-Example.ps1 | 1-Example.ps1 | <#
.EXAMPLE
This example applies permissions for the user profile service application to limit
access to specific features.
#>
Configuration Example
{
param(
[Parameter(Mandatory = $true)]
[PSCredential]
$SetupAccount
)
Import-Ds... |
PowerShellCorpus/PowerShellGallery/SharePointDSC/1.7.0.0/Examples/Resources/SPAppManagementServiceApp/1-CreateServiceApp.ps1 | 1-CreateServiceApp.ps1 | <#
.EXAMPLE
This example shows how to create a new app management service application in the
local SharePoint farm.
#>
Configuration Example
{
param(
[Parameter(Mandatory = $true)]
[PSCredential]
$SetupAccount
)
Import-DscResour... |
PowerShellCorpus/PowerShellGallery/SharePointDSC/1.7.0.0/Examples/Resources/SPAppManagementServiceApp/2-RemoveServiceApp.ps1 | 2-RemoveServiceApp.ps1 | <#
.EXAMPLE
This example shows how to remove a specific app management service application in the
local SharePoint farm. The application pool property is still mandatory but it is not
used so therefore the value is not important.
#>
Configuration Example
{
param(
[P... |
PowerShellCorpus/PowerShellGallery/SharePointDSC/1.7.0.0/Examples/Resources/SPHealthAnalyzerRuleState/1-DisableHealthRule.ps1 | 1-DisableHealthRule.ps1 | <#
.EXAMPLE
This example shows how to disable a health analyzer rule
#>
Configuration Example
{
param(
[Parameter(Mandatory = $true)]
[PSCredential]
$SetupAccount
)
Import-DscResource -ModuleName SharePointDsc
node localho... |
PowerShellCorpus/PowerShellGallery/SharePointDSC/1.7.0.0/Examples/Resources/SPJoinFarm/1-JoinFarm.ps1 | 1-JoinFarm.ps1 | <#
.EXAMPLE
This example shows how to join an existing SharePoint farm.
#>
Configuration Example
{
param(
[Parameter(Mandatory = $true)]
[PSCredential]
$SetupAccount,
[Parameter(Mandatory = $true)]
[PSCredential]
... |
PowerShellCorpus/PowerShellGallery/SharePointDSC/1.7.0.0/Examples/Resources/SPJoinFarm/1-JoinFarmWithRole.ps1 | 1-JoinFarmWithRole.ps1 | <#
.EXAMPLE
This example shows how to join an existing SharePoint farm using a specific
server role (applies to SharePoint 2016 only).
#>
Configuration Example
{
param(
[Parameter(Mandatory = $true)]
[PSCredential]
$SetupAccount,
[P... |
PowerShellCorpus/PowerShellGallery/SharePointDSC/1.7.0.0/Examples/Resources/SPSearchCrawlMapping/1-Example.ps1 | 1-Example.ps1 | <#
.EXAMPLE
This example shows how to apply a Search Crawl Mapping rule to a search application.
#>
Configuration Example
{
param(
[Parameter(Mandatory = $true)]
[PSCredential]
$SetupAccount
)
Import-DscResource -ModuleName SharePoint... |
PowerShellCorpus/PowerShellGallery/SharePointDSC/1.7.0.0/Examples/Resources/SPSubscriptionSettingsServiceApp/1-NewServiceApp.ps1 | 1-NewServiceApp.ps1 | <#
.EXAMPLE
This example creates a new subscription settings service app in the local farm.
#>
Configuration Example
{
param(
[Parameter(Mandatory = $true)]
[PSCredential]
$SetupAccount
)
Import-DscResource -ModuleName SharePointDsc
... |
PowerShellCorpus/PowerShellGallery/SharePointDSC/1.7.0.0/Examples/Resources/SPSubscriptionSettingsServiceApp/2-RemoveServiceApp.ps1 | 2-RemoveServiceApp.ps1 | <#
.EXAMPLE
This example removes a subscription settings service app in the local farm.
The ApplicationPool property is required, but is ignored when removing a
service app.
#>
Configuration Example
{
param(
[Parameter(Mandatory = $true)]
[PSCredential]
... |
PowerShellCorpus/PowerShellGallery/SharePointDSC/1.7.0.0/Examples/Resources/SPWebAppThrottlingSettings/1-Example.ps1 | 1-Example.ps1 | <#
.EXAMPLE
This example shows how to apply throttling settings to a specific web app
#>
Configuration Example
{
param(
[Parameter(Mandatory = $true)]
[PSCredential]
$SetupAccount
)
Import-DscResource -ModuleName SharePointDsc
... |
PowerShellCorpus/PowerShellGallery/SharePointDSC/1.7.0.0/Examples/Resources/SPDatabaseAAG/1-AddDBtoAAG.ps1 | 1-AddDBtoAAG.ps1 | <#
.EXAMPLE
This example takes an existing SharePoint database and puts it in to the specified
AlwaysOn Availability Group (AAG).
#>
Configuration Example
{
param(
[Parameter(Mandatory = $true)]
[PSCredential]
$SetupAccount
)
Imp... |
PowerShellCorpus/PowerShellGallery/SharePointDSC/1.7.0.0/Examples/Resources/SPDatabaseAAG/3-RemoveDBfromAAG.ps1 | 3-RemoveDBfromAAG.ps1 | <#
.EXAMPLE
This example removes a database from the specified AlwaysOn Availability Group (AAG)
#>
Configuration Example
{
param(
[Parameter(Mandatory = $true)]
[PSCredential]
$SetupAccount
)
Import-DscResource -ModuleName SharePoint... |
PowerShellCorpus/PowerShellGallery/SharePointDSC/1.7.0.0/Examples/Resources/SPDatabaseAAG/2-AddMultipleDBstoAAG.ps1 | 2-AddMultipleDBstoAAG.ps1 | <#
.EXAMPLE
This example takes existing SharePoint databases, based on the database name pattern, and puts
them in to the specified AlwaysOn Availability Group (AAG).
#>
Configuration Example
{
param(
[Parameter(Mandatory = $true)]
[PSCredential]
... |
PowerShellCorpus/PowerShellGallery/SharePointDSC/1.7.0.0/Examples/Resources/SPTrustedIdentityTokenIssuer/1-SigningCertInFileCertificateStore.ps1 | 1-SigningCertInFileCertificateStore.ps1 | <#
.EXAMPLE
This example deploys a trusted token issuer to the local farm.
#>
Configuration Example
{
param(
[Parameter(Mandatory = $true)]
[PSCredential]
$SetupAccount
)
Import-DscResource -ModuleName SharePointDsc
node lo... |
PowerShellCorpus/PowerShellGallery/SharePointDSC/1.7.0.0/Examples/Resources/SPTrustedIdentityTokenIssuer/2-SigningCertInFilePath.ps1 | 2-SigningCertInFilePath.ps1 | <#
.EXAMPLE
This example deploys a trusted token issuer to the local farm.
#>
Configuration Example
{
param(
[Parameter(Mandatory = $true)]
[PSCredential]
$SetupAccount
)
Import-DscResource -ModuleName SharePointDsc
node lo... |
PowerShellCorpus/PowerShellGallery/SharePointDSC/1.7.0.0/Examples/Resources/SPInstallLanguagePack/2-InstallLanguagePackInWindow.ps1 | 2-InstallLanguagePackInWindow.ps1 | <#
.EXAMPLE
This module will install the SharePoint Language Pack in the specified timeframe.
The binaries for SharePoint in this scenario are stored at C:\SPInstall (so it
will look to run C:\SPInstall\Setup.exe)
#>
Configuration Example
{
param(
[Parameter(Mandatory... |
PowerShellCorpus/PowerShellGallery/SharePointDSC/1.7.0.0/Examples/Resources/SPInstallLanguagePack/1-InstallLanguagePack.ps1 | 1-InstallLanguagePack.ps1 | <#
.EXAMPLE
This module will install the SharePoint Language Pack. The binaries for
SharePoint in this scenario are stored at C:\SPInstall (so it will look to run
C:\SPInstall\Setup.exe)
#>
Configuration Example
{
param(
[Parameter(Mandatory = $true)]
[PS... |
PowerShellCorpus/PowerShellGallery/SharePointDSC/1.7.0.0/Examples/Resources/SPWebAppSiteUseAndDeletion/1-Example.ps1 | 1-Example.ps1 | <#
.EXAMPLE
This example shows how to apply site use and deletion settings to the specified web applicaiton
#>
Configuration Example
{
param(
[Parameter(Mandatory = $true)]
[PSCredential]
$SetupAccount
)
Import-DscResource -ModuleName... |
PowerShellCorpus/PowerShellGallery/SharePointDSC/1.7.0.0/Examples/Resources/SPAppCatalog/1-SetSiteAsAppCatalog.ps1 | 1-SetSiteAsAppCatalog.ps1 | <#
.EXAMPLE
This example shows how to configure the AppCatalog in the farm
#>
Configuration Example
{
param(
[Parameter(Mandatory = $true)]
[PSCredential]
$SetupAccount
)
Import-DscResource -ModuleName SharePointDsc
node lo... |
PowerShellCorpus/PowerShellGallery/SharePointDSC/1.7.0.0/Examples/Resources/SPProductUpdate/2-InstallSP.ps1 | 2-InstallSP.ps1 | <#
.EXAMPLE
This example installs the SharePoint 2013 Service Pack only in the specified window.
It also shuts down services to speed up the installation process.
#>
Configuration Example
{
param(
[Parameter(Mandatory = $true)]
[PSCredential]
$Set... |
PowerShellCorpus/PowerShellGallery/SharePointDSC/1.7.0.0/Examples/Resources/SPProductUpdate/3-InstallLPSP.ps1 | 3-InstallLPSP.ps1 | <#
.EXAMPLE
This example installs the SharePoint 2013 Dutch Language Pack Service Pack only in the specified window.
It also shuts down services to speed up the installation process.
#>
Configuration Example
{
param(
[Parameter(Mandatory = $true)]
[PSCredentia... |
PowerShellCorpus/PowerShellGallery/SharePointDSC/1.7.0.0/Examples/Resources/SPProductUpdate/1-InstallCU.ps1 | 1-InstallCU.ps1 | <#
.EXAMPLE
This example installs the Cumulative Update only in the specified window.
It also shuts down services to speed up the installation process.
#>
Configuration Example
{
param(
[Parameter(Mandatory = $true)]
[PSCredential]
$SetupAccount
... |
PowerShellCorpus/PowerShellGallery/SharePointDSC/1.7.0.0/Examples/Resources/SPWebAppPermissions/1-LimitPermissions.ps1 | 1-LimitPermissions.ps1 | <#
.EXAMPLE
This example shows how to limit the available permisions within a web app
#>
Configuration Example
{
param(
[Parameter(Mandatory = $true)]
[PSCredential]
$SetupAccount
)
Import-DscResource -ModuleName SharePointDsc
... |
PowerShellCorpus/PowerShellGallery/SharePointDSC/1.7.0.0/Examples/Resources/SPWebAppPermissions/2-AllPermissions.ps1 | 2-AllPermissions.ps1 | <#
.EXAMPLE
This example shows how to ensure all permissions are available for a web app
#>
Configuration Example
{
param(
[Parameter(Mandatory = $true)]
[PSCredential]
$SetupAccount
)
Import-DscResource -ModuleName SharePointDsc
... |
PowerShellCorpus/PowerShellGallery/SharePointDSC/1.7.0.0/Examples/Resources/SPVisioServiceApp/1-NewServiceApp.ps1 | 1-NewServiceApp.ps1 | <#
.EXAMPLE
This example shows how to create a new visio services service app in the local farm
#>
Configuration Example
{
param(
[Parameter(Mandatory = $true)]
[PSCredential]
$SetupAccount
)
Import-DscResource -ModuleName SharePointD... |
PowerShellCorpus/PowerShellGallery/SharePointDSC/1.7.0.0/Examples/Resources/SPVisioServiceApp/2-RemoveServiceApp.ps1 | 2-RemoveServiceApp.ps1 | <#
.EXAMPLE
This example shows how to remove a visio services service app in the local farm.
The ApplicationPool property is still requried but is not used when removing, so
the value used here doesn't matter.
#>
Configuration Example
{
param(
[Parameter(Mandatory = $... |
PowerShellCorpus/PowerShellGallery/SharePointDSC/1.7.0.0/Examples/Resources/SPWebApplication/2-ClaimsExample.ps1 | 2-ClaimsExample.ps1 | <#
.EXAMPLE
This example shows how to create a new web application in the local farm using a custom claim provider.
A SPTrustedIdentityTokenIssuer is created named Contoso, then this SPTrustedIdentityTokenIssuer is referenced
by the SPWebApplication as the AuthenticationProvider and the AuthenticationMe... |
PowerShellCorpus/PowerShellGallery/SharePointDSC/1.7.0.0/Examples/Resources/SPWebApplication/1-Example.ps1 | 1-Example.ps1 | <#
.EXAMPLE
This example shows how to create a new web application in the local farm
#>
Configuration Example
{
param(
[Parameter(Mandatory = $true)]
[PSCredential]
$SetupAccount
)
Import-DscResource -ModuleName SharePointDsc
... |
PowerShellCorpus/PowerShellGallery/SharePointDSC/1.7.0.0/Examples/Resources/SPUserProfileSyncConnection/1-Example.ps1 | 1-Example.ps1 | <#
.EXAMPLE
This example adds a new user profile sync connection to the specified user
profile service app
#>
Configuration Example
{
param(
[Parameter(Mandatory = $true)]
[PSCredential]
$SetupAccount,
[Parameter(Mandatory = $true)... |
PowerShellCorpus/PowerShellGallery/SharePointDSC/1.7.0.0/Examples/Resources/SPShellAdmins/2-SpecificDBs.ps1 | 2-SpecificDBs.ps1 | <#
.EXAMPLE
This example gives admin access to the specified users for the local farm as well as
all content databases in the local farm.
#>
Configuration Example
{
param(
[Parameter(Mandatory = $true)]
[PSCredential]
$SetupAccount
)
... |
PowerShellCorpus/PowerShellGallery/SharePointDSC/1.7.0.0/Examples/Resources/SPShellAdmins/1-FarmAdmins.ps1 | 1-FarmAdmins.ps1 | <#
.EXAMPLE
This example gives admin access to the specified users for the local farm as well as
all content databases in the local farm.
#>
Configuration Example
{
param(
[Parameter(Mandatory = $true)]
[PSCredential]
$SetupAccount
)
... |
PowerShellCorpus/PowerShellGallery/SharePointDSC/1.7.0.0/Examples/Resources/SPBlobCacheSettings/1-ApplyBlobCacheConfig.ps1 | 1-ApplyBlobCacheConfig.ps1 | <#
.EXAMPLE
This example shows how to configure the blob cache settings on the local server for the
specified web application and zone
#>
Configuration Example
{
param(
[Parameter(Mandatory = $true)]
[PSCredential]
$SetupAccount
)
... |
PowerShellCorpus/PowerShellGallery/SharePointDSC/1.7.0.0/Examples/Resources/SPFarmAdministrators/2-SetIncludeExcludeAdmins.ps1 | 2-SetIncludeExcludeAdmins.ps1 | <#
.EXAMPLE
This example shows how certain changes are made to the farm admins groups. Here any
members in the MembersToInclude property are added, and members in the MembersToExclude
property are removed. Any members that exist in the farm admins group that aren't listed
in either of these propert... |
PowerShellCorpus/PowerShellGallery/SharePointDSC/1.7.0.0/Examples/Resources/SPFarmAdministrators/1-SetSpecificAdmins.ps1 | 1-SetSpecificAdmins.ps1 | <#
.EXAMPLE
This example shows how to set a specific list of members for the farm admins group.
Any members not in this list will be removed.
#>
Configuration Example
{
param(
[Parameter(Mandatory = $true)]
[PSCredential]
$SetupAccount
)... |
PowerShellCorpus/PowerShellGallery/SharePointDSC/1.7.0.0/Examples/Resources/SPManagedMetaDataServiceApp/3-SetTermStoreAdmins.ps1 | 3-SetTermStoreAdmins.ps1 | <#
.EXAMPLE
This example shows how to deploy the Managed Metadata service app to the local SharePoint farm
and also include a specific list of users to be the term store administrators.
#>
Configuration Example
{
param(
[Parameter(Mandatory = $true)]
[PSCreden... |
PowerShellCorpus/PowerShellGallery/SharePointDSC/1.7.0.0/Examples/Resources/SPManagedMetaDataServiceApp/1-CreateServiceApp.ps1 | 1-CreateServiceApp.ps1 | <#
.EXAMPLE
This example shows how to deploy the Managed Metadata service app to the local SharePoint farm.
#>
Configuration Example
{
param(
[Parameter(Mandatory = $true)]
[PSCredential]
$SetupAccount
)
Import-DscResource -ModuleName... |
PowerShellCorpus/PowerShellGallery/SharePointDSC/1.7.0.0/Examples/Resources/SPManagedMetaDataServiceApp/2-RemoveServiceApp.ps1 | 2-RemoveServiceApp.ps1 | <#
.EXAMPLE
This example shows how to remove a specific managed metadata service app from the
local SharePoint farm. Because Application pool parameter is required
but is not acutally needed to remove the app, any text value can
be supplied for these as it will be ignored.
#>
Configura... |
PowerShellCorpus/PowerShellGallery/SharePointDSC/1.7.0.0/Examples/Resources/SPOutgoingEmailSettings/2-WebApp.ps1 | 2-WebApp.ps1 | <#
.EXAMPLE
This example shows to set outgoing email settings for a specific web app
#>
Configuration Example
{
param(
[Parameter(Mandatory = $true)]
[PSCredential]
$SetupAccount
)
Import-DscResource -ModuleName SharePointDsc
... |
PowerShellCorpus/PowerShellGallery/SharePointDSC/1.7.0.0/Examples/Resources/SPOutgoingEmailSettings/1-WholeFarm.ps1 | 1-WholeFarm.ps1 | <#
.EXAMPLE
This example shows to set outgoing email settings for the entire farm. Use the URL
of the central admin site for the web app URL to apply for the entire farm.
#>
Configuration Example
{
param(
[Parameter(Mandatory = $true)]
[PSCredential]
... |
PowerShellCorpus/PowerShellGallery/SharePointDSC/1.7.0.0/Examples/Resources/SPWebAppWorkflowSettings/1-Example.ps1 | 1-Example.ps1 | <#
.EXAMPLE
This example shows how to apply workflow settings to the specific web application
#>
Configuration Example
{
param(
[Parameter(Mandatory = $true)]
[PSCredential]
$SetupAccount
)
Import-DscResource -ModuleName SharePointDsc... |
PowerShellCorpus/PowerShellGallery/SharePointDSC/1.7.0.0/Examples/Resources/SPUserProfileServiceApp/1-Example.ps1 | 1-Example.ps1 | <#
.EXAMPLE
This example adds a new user profile service application to the local farm
#>
Configuration Example
{
param(
[Parameter(Mandatory = $true)]
[PSCredential]
$SetupAccount,
[Parameter(Mandatory = $true)]
[PSCredenti... |
PowerShellCorpus/PowerShellGallery/SharePointDSC/1.7.0.0/Examples/Resources/SPWordAutomationServiceApp/1-NewServiceApp.ps1 | 1-NewServiceApp.ps1 | <#
.EXAMPLE
This example makes sure the service application exists and has a specific configuration
#>
Configuration Example
{
param(
[Parameter(Mandatory = $true)]
[PSCredential]
$SetupAccount
)
Import-DscResource -ModuleName SharePo... |
PowerShellCorpus/PowerShellGallery/SharePointDSC/1.7.0.0/Examples/Resources/SPWordAutomationServiceApp/2-RemoveServiceApp.ps1 | 2-RemoveServiceApp.ps1 | <#
.EXAMPLE
This example removes a word automation service app
#>
Configuration Example
{
param(
[Parameter(Mandatory = $true)]
[PSCredential]
$SetupAccount
)
Import-DscResource -ModuleName SharePointDsc
node localhost {
... |
PowerShellCorpus/PowerShellGallery/SharePointDSC/1.7.0.0/Examples/Resources/SPAppDomain/1-SetAppDomainDetails.ps1 | 1-SetAppDomainDetails.ps1 | <#
.EXAMPLE
This example shows how to apply app URLs to the current farm.
#>
Configuration Example
{
param(
[Parameter(Mandatory = $true)]
[PSCredential]
$SetupAccount
)
Import-DscResource -ModuleName SharePointDsc
node lo... |
PowerShellCorpus/PowerShellGallery/SharePointDSC/1.7.0.0/Examples/Resources/SPInstall/1-InstallToDefaultPath.ps1 | 1-InstallToDefaultPath.ps1 | <#
.EXAMPLE
This module will install SharePoint to the default locations. The binaries for
SharePoint in this scenario are stored at C:\SPInstall (so it will look to run
C:\SPInstall\Setup.exe)
#>
Configuration Example
{
param(
[Parameter(Mandatory = $true)]
... |
PowerShellCorpus/PowerShellGallery/SharePointDSC/1.7.0.0/Examples/Resources/SPInstall/3-InstallSPFoundation.ps1 | 3-InstallSPFoundation.ps1 | <#
.EXAMPLE
This module will install SharePoint Foundation 2013 to the local server
#>
Configuration Example
{
param(
[Parameter(Mandatory = $true)]
[PSCredential]
$SetupAccount
)
Import-DscResource -ModuleName PSDesiredStateConfigura... |
PowerShellCorpus/PowerShellGallery/SharePointDSC/1.7.0.0/Examples/Resources/SPInstall/2-InstallToCustomPath.ps1 | 2-InstallToCustomPath.ps1 | <#
.EXAMPLE
This module will install SharePoint to the specific locations set for the
InstallPath and DataPath directories.
#>
Configuration Example
{
param(
[Parameter(Mandatory = $true)]
[PSCredential]
$SetupAccount
)
Import-D... |
PowerShellCorpus/PowerShellGallery/SharePointDSC/1.7.0.0/Examples/Resources/SPInstallPrereqs/2-OfflineInstall.ps1 | 2-OfflineInstall.ps1 | <#
.EXAMPLE
This module will install the prerequisites for SharePoint 2013. This resource will run in
offline mode, running all prerequisite installations from the specified paths.
#>
Configuration Example
{
param(
[Parameter(Mandatory = $true)]
[PSCredential]... |
PowerShellCorpus/PowerShellGallery/SharePointDSC/1.7.0.0/Examples/Resources/SPInstallPrereqs/1-OnlineInstall.ps1 | 1-OnlineInstall.ps1 | <#
.EXAMPLE
This module will install the prerequisites for SharePoint. This resource will run in
online mode, looking to download all prerequisites from the internet.
#>
Configuration Example
{
param(
[Parameter(Mandatory = $true)]
[PSCredential]
... |
PowerShellCorpus/PowerShellGallery/SharePointDSC/1.7.0.0/Examples/Resources/SPSearchServiceApp/1-NewServiceApp.ps1 | 1-NewServiceApp.ps1 | <#
.EXAMPLE
This example creates a new search service app in the local farm
#>
Configuration Example
{
param(
[Parameter(Mandatory = $true)]
[PSCredential]
$SetupAccount
)
Import-DscResource -ModuleName SharePointDsc
node l... |
PowerShellCorpus/PowerShellGallery/SharePointDSC/1.7.0.0/Examples/Resources/SPSearchServiceApp/2-RemoveServiceApp.ps1 | 2-RemoveServiceApp.ps1 | <#
.EXAMPLE
This example removes a search service app in the local farm. The ApplicationPool
parameter is still required but is not actually used, so its value does not matter.
#>
Configuration Example
{
param(
[Parameter(Mandatory = $true)]
[PSCredential]
... |
PowerShellCorpus/PowerShellGallery/SharePointDSC/1.7.0.0/Examples/Resources/SPServiceAppProxyGroup/1-ProxyGroups.ps1 | 1-ProxyGroups.ps1 | <#
.EXAMPLE
This example creates two seperate proxy groups of service apps that can be
assigned to web apps in the farm
#>
Configuration Example
{
param(
[Parameter(Mandatory = $true)]
[PSCredential]
$SetupAccount
)
Import-DscRe... |
PowerShellCorpus/PowerShellGallery/SharePointDSC/1.7.0.0/Examples/Resources/SPSecureStoreServiceApp/1-NewServiceApp.ps1 | 1-NewServiceApp.ps1 | <#
.EXAMPLE
This example creates a new secure store service app.
#>
Configuration Example
{
param(
[Parameter(Mandatory = $true)]
[PSCredential]
$SetupAccount
)
Import-DscResource -ModuleName SharePointDsc
node localhost {
... |
PowerShellCorpus/PowerShellGallery/SharePointDSC/1.7.0.0/Examples/Resources/SPSecureStoreServiceApp/2-RemoveServiceApp.ps1 | 2-RemoveServiceApp.ps1 | <#
.EXAMPLE
This example removes a secure store service app. The ApplicationPool and
AuditingEnabled parameters are required, but are not used so their values
are able to be set to anything.
#>
Configuration Example
{
param(
[Parameter(Mandatory = $true)]
... |
PowerShellCorpus/PowerShellGallery/SharePointDSC/1.7.0.0/Examples/Resources/SPTimerJobState/1-Example.ps1 | 1-Example.ps1 | <#
.EXAMPLE
This example show how to disable the dead site delete job in the local farm.
#>
Configuration Example
{
param(
[Parameter(Mandatory = $true)]
[PSCredential]
$SetupAccount
)
Import-DscResource -ModuleName SharePointDsc
... |
PowerShellCorpus/PowerShellGallery/SharePointDSC/1.7.0.0/Examples/Resources/SPAntivirusSettings/1-SetAntivirusConfig.ps1 | 1-SetAntivirusConfig.ps1 | <#
.EXAMPLE
This example shows how to apply specific anti-virus configuration to the farm
#>
Configuration Example
{
param(
[Parameter(Mandatory = $true)]
[PSCredential]
$SetupAccount
)
Import-DscResource -ModuleName SharePointDsc
... |
PowerShellCorpus/PowerShellGallery/SharePointDSC/1.7.0.0/Examples/Resources/SPDiagnosticLoggingSettings/1-ApplyLoggingSettings.ps1 | 1-ApplyLoggingSettings.ps1 | <#
.EXAMPLE
This example applies the specified diagnostic logging settings to the local
SharPoint farm. Any setting not defined will be left as it default, or to
whatever value has been manually configured outside of DSC.
#>
Configuration Example
{
param(
[Parameter(M... |
PowerShellCorpus/PowerShellGallery/SharePointDSC/1.7.0.0/Examples/Resources/SPCacheAccounts/1-SetCacheAccounts.ps1 | 1-SetCacheAccounts.ps1 | <#
.EXAMPLE
This example sets the super use and reader accounts for the specified web app. It will
also set the appropriate web app policies by default for these accounts.
#>
Configuration Example
{
param(
[Parameter(Mandatory = $true)]
[PSCredential]
... |
PowerShellCorpus/PowerShellGallery/SharePointDSC/1.7.0.0/Examples/Resources/SPCacheAccounts/2-SetCacheAccountsNoPolicy.ps1 | 2-SetCacheAccountsNoPolicy.ps1 | <#
.EXAMPLE
This example sets the super use and reader accounts for the specified web app. It will
not set the web app policies for these accounts though, allowing them to be controlled
elsewhere (either manually or with SPWebAppPolicy)
#>
Configuration Example
{
param(
... |
PowerShellCorpus/PowerShellGallery/DemosSept2015/0.1/0-CommonInit.ps1 | 0-CommonInit.ps1 | $MyPath = Split-Path $MyInvocation.MyCommand.Path
$DemoRoot = 'D:\Nana\Test'
$OutputPath = "$DemoRoot\CompiledConfigurations"
$TraceFolder = "$DemoRoot\Traces"
$AzureDemoNode = 'Nana-AADemo-10'
Import-Module -Force "$MyPath\HelperMethods.psm1"
$DomainController = 'Nana-XM-DC'
$DNSServer = '... |
PowerShellCorpus/PowerShellGallery/DemosSept2015/0.1/xMachine/ConfigData.AddToDomain.ps1 | ConfigData.AddToDomain.ps1 | $ScriptPath = Split-Path $MyInvocation.MyCommand.Path
. "$ScriptPath\..\0-CommonInit.ps1"
if ($Credential -eq $null)
{
$Credential = Get-Credential Administrator -Message 'Enter domain admin credential'
}
@{
AllNodes = @(
@{
NodeName = 'Nana-XM-Node'
... |
PowerShellCorpus/PowerShellGallery/DemosSept2015/0.1/xMachine/Configuration.DomainSetup.ps1 | Configuration.DomainSetup.ps1 | configuration DomainSetup
{
Import-DscResource -ModuleName PSDesiredStateConfiguration, xActiveDirectory
node $AllNodes.Where{$_.Role -eq 'DomainController'}.Nodename
{
WindowsFeature ADDSInstall
{
Ensure = 'Present'
Name = 'AD-Domain-Services'
}
... |
PowerShellCorpus/PowerShellGallery/DemosSept2015/0.1/xMachine/HalfConfig.ps1 | HalfConfig.ps1 | $ScriptPath = Split-Path $MyInvocation.MyCommand.Path
. "$ScriptPath\Assert-DomainSetup.ps1" |
PowerShellCorpus/PowerShellGallery/DemosSept2015/0.1/xMachine/MetaConfig.DomainSetup.ps1 | MetaConfig.DomainSetup.ps1 | [DscLocalConfigurationManager()]
configuration DCMetaConfig
{
node $AllNodes.Where{$_.Role -eq 'DomainController'}.Nodename
{
Settings
{
ActionAfterReboot = 'StopConfiguration'
}
}
} |
PowerShellCorpus/PowerShellGallery/DemosSept2015/0.1/xMachine/Invoke-AddToDomain.ps1 | Invoke-AddToDomain.ps1 | $ScriptPath = Split-Path $MyInvocation.MyCommand.Path
. "$ScriptPath\..\0-CommonInit.ps1"
$ConfigData = (& "$ScriptPath\ConfigData.AddToDomain.ps1")
. "$ScriptPath\Configuration.AddToDomain.ps1"
Remove-Item -Recurse -Force "$OutputPath\AddToDomain" 2> $null
AddToDomain -OutputPath "$OutputPath\AddToDomain" -Co... |
PowerShellCorpus/PowerShellGallery/DemosSept2015/0.1/xMachine/Configuration.AddToDomain.ps1 | Configuration.AddToDomain.ps1 | configuration AddToDomain
{
Import-DscResource -ModuleName xActiveDirectory, xComputerManagement, xNetworking, PSDesiredStateConfiguration
node $AllNodes.Where{$_.Role -eq 'Node'}.Nodename
{
xDNSServerAddress DNS
{
InterfaceAlias = 'Ethernet'
Address ... |
PowerShellCorpus/PowerShellGallery/DemosSept2015/0.1/xMachine/ConfigData.DomainSetup.ps1 | ConfigData.DomainSetup.ps1 | $ScriptPath = Split-Path $MyInvocation.MyCommand.Path
if ($Credential -eq $null)
{
$Credential = Get-Credential Administrator -Message 'Enter domain admin credential (will also be used as Safemode Admin Credentials)'
}
@{
AllNodes = @(
@{
NodeName = 'Nana-XM-DC... |
PowerShellCorpus/PowerShellGallery/DemosSept2015/0.1/xMachine/Assert-MetaConfig.ps1 | Assert-MetaConfig.ps1 | $ScriptPath = Split-Path $MyInvocation.MyCommand.Path
. "$ScriptPath\..\0-CommonInit.ps1"
$ConfigData = (& "$ScriptPath\ConfigData.DomainSetup.ps1")
. "$ScriptPath\MetaConfig.DomainSetup.ps1"
Remove-Item -Recurse -Force "$OutputPath\DCMetaConfig" 2> $null
DCMetaConfig -OutputPath "$OutputPath\DCMetaConfig" -Co... |
PowerShellCorpus/PowerShellGallery/DemosSept2015/0.1/xMachine/Assert-DomainSetup.ps1 | Assert-DomainSetup.ps1 | $ScriptPath = Split-Path $MyInvocation.MyCommand.Path
. "$ScriptPath\..\0-CommonInit.ps1"
$ConfigData = (& "$ScriptPath\ConfigData.DomainSetup.ps1")
. "$ScriptPath\Configuration.DomainSetup.ps1"
Remove-Item -Recurse -Force "$OutputPath\DomainSetup" 2> $null
DomainSetup -OutputPath "$OutputPath\DomainSetup" -Co... |
PowerShellCorpus/PowerShellGallery/DemosSept2015/0.1/ConfigurationStatus/Demo.ps1 | Demo.ps1 | $ScriptPath = Split-Path $MyInvocation.MyCommand.Path
. "$ScriptPath\..\0-CommonInit.ps1"
# get configuration status from a node
$s = New-CimSession -ComputerName $DomainController -Credential $Credential
Get-DscConfigurationStatus -CimSession $s
# get all configuration status
Get-DscConfigurationStatus -CimS... |
PowerShellCorpus/PowerShellGallery/DemosSept2015/0.1/TestConfiguration/Configuration.Simple.ps1 | Configuration.Simple.ps1 | configuration Simple
{
Import-DscResource -ModuleName PSDesiredStateConfiguration
node $AllNodes.Where{$_.Role -eq 'Node'}.Nodename
{
File Helo
{
DestinationPath = 'C:\Temp\HeloWorld.txt'
Contents = 'Helo world'
}
}
} |
PowerShellCorpus/PowerShellGallery/DemosSept2015/0.1/TestConfiguration/Configuration.Features.ps1 | Configuration.Features.ps1 | Configuration Features
{
Import-DscResource -ModuleName PSDesiredStateConfiguration
node $AllNodes.Where{$_.Role -eq 'Node'}.Nodename
{
WindowsFeature IIS
{
Name = 'Web-Server'
Ensure = 'Present'
}
}
} |
PowerShellCorpus/PowerShellGallery/DemosSept2015/0.1/TestConfiguration/ConfigData.Simple.ps1 | ConfigData.Simple.ps1 | @{
AllNodes = @(
@{
NodeName = 'Nana-XM-Node'
Role = 'Node'
}
)
} |
PowerShellCorpus/PowerShellGallery/DemosSept2015/0.1/TestConfiguration/Demo.ps1 | Demo.ps1 | $ScriptPath = Split-Path $MyInvocation.MyCommand.Path
. "$ScriptPath\..\0-CommonInit.ps1"
$s = New-CimSession -ComputerName $TestNode -Credential $Credential
# get VM to initial state
# Restore-VMSnapshot -Name 'Initial' -VMName $TestNode -Verbose
# test the status of a configuration
Test-DscConfiguration ... |
PowerShellCorpus/PowerShellGallery/DemosSept2015/0.1/RunAs/ProcessOwnerCredential.ConfigData.ps1 | ProcessOwnerCredential.ConfigData.ps1 | @{
AllNodes = @(
@{
NodeName = 'localhost'
Role = 'DemoNode'
PSDscAllowPlainTextPassword = $true
}
)
} |
PowerShellCorpus/PowerShellGallery/DemosSept2015/0.1/RunAs/ProcessOwnerCredential.ps1 | ProcessOwnerCredential.ps1 | $ScriptPath = Split-Path $MyInvocation.MyCommand.Path
configuration ProcessOwnerCredential
{
Import-DscResource -ModuleName PSDesiredStateConfiguration
node $AllNodes.Where{$_.Role -eq 'DemoNode'}.NodeName
{
Script owner
{
GetScript = {@{}}
SetScript = {$... |
PowerShellCorpus/PowerShellGallery/DemosSept2015/0.1/RunAs/ProcessOwner.ps1 | ProcessOwner.ps1 | $ScriptPath = Split-Path $MyInvocation.MyCommand.Path
configuration ProcessOwner
{
Import-DscResource -ModuleName PSDesiredStateConfiguration
Script owner
{
GetScript = {@{}}
SetScript = {$p = (Get-Process -id $pid);
$info = (D:\Nana\Official\git\DemosSept201... |
PowerShellCorpus/PowerShellGallery/DemosSept2015/0.1/RunAs/Get-ProcessOwner.ps1 | Get-ProcessOwner.ps1 | ##############################################################################
##
## Get-ProcessOwner.ps1
## Get the owner of a process.
##
## Script taken from http://www.leeholmes.com/blog/2006/07/21/get-the-owner-of-a-process-in-powershell-%E2%80%93-pinvoke-and-refout-parameters/
##
####################... |
PowerShellCorpus/PowerShellGallery/DemosSept2015/0.1/RunAs/Demo.ps1 | Demo.ps1 | $ScriptPath = Split-Path $MyInvocation.MyCommand.Path
. "$ScriptPath\..\0-CommonInit.ps1"
# Try to figure out the context in which DSC runs
# Thanks Lee Holmes for the script
psedit "$ScriptPath\Get-ProcessOwner.ps1"
psedit "$ScriptPath\ProcessOwner.ps1"
# compile and invoke the configuration
. "$ScriptPath\... |
PowerShellCorpus/PowerShellGallery/DemosSept2015/0.1/PartialConfigurations/HeloWorld.ps1 | HeloWorld.ps1 | configuration HeloWorld
{
param(
[string]
$ComputerName
)
Import-DscResource -ModuleName PSDesiredStateConfiguration
node $ComputerName
{
File f
{
Contents = 'Helo World'
DestinationPath = 'c:\temp\heloworld.txt'
... |
PowerShellCorpus/PowerShellGallery/DemosSept2015/0.1/PartialConfigurations/MetaConfiguration.ps1 | MetaConfiguration.ps1 | [DscLocalConfigurationManager()]
configuration MetaConfiguration
{
param(
[string]
$ComputerName = 'localhost'
)
node $ComputerName
{
Settings
{
RefreshFrequencyMins = 60
ActionAfterReboot = 'StopConfiguration'
Debu... |
PowerShellCorpus/PowerShellGallery/DemosSept2015/0.1/PartialConfigurations/AppLayer.ps1 | AppLayer.ps1 | Configuration AppLayer
{
param(
[string]
$ComputerName
)
# Import the module that defines custom resources
Import-DscResource -Module xWebAdministration, PSDesiredStateConfiguration
node $ComputerName
{
# Stop the default website
... |
PowerShellCorpus/PowerShellGallery/DemosSept2015/0.1/PartialConfigurations/MetaConfigurationForPartialConfigs.ps1 | MetaConfigurationForPartialConfigs.ps1 | [DscLocalConfigurationManager()]
configuration MetaConfigForPartialConfigs
{
param(
[string]
$ComputerName
)
node $ComputerName
{
Settings
{
RefreshFrequencyMins = 60
}
PartialConfiguration OSLayer
{
De... |
PowerShellCorpus/PowerShellGallery/DemosSept2015/0.1/PartialConfigurations/OSLayer.ps1 | OSLayer.ps1 | Configuration OSLayer
{
param(
[string]
$ComputerName
)
Import-DscResource -ModuleName PSDesiredStateConfiguration, xwebadministration
node $ComputerName
{
# Install the IIS role
WindowsFeature IIS
{
Ensure = "P... |
PowerShellCorpus/PowerShellGallery/DemosSept2015/0.1/PartialConfigurations/PartialConfiguration.ps1 | PartialConfiguration.ps1 | #region Declarations
$ScriptPath = Split-Path $MyInvocation.MyCommand.Path
. "$ScriptPath\..\0-CommonInit.ps1"
#endregion Declarations
# In PowerShell 5.0, there is a new syntax for partial configurations
psedit "$ScriptPath\MetaConfiguration.ps1"
# for partial configurations, meta configuration must firs... |
PowerShellCorpus/PowerShellGallery/DemosSept2015/0.1/Debugging/ServiceConfiguration.ps1 | ServiceConfiguration.ps1 | configuration ServiceConfiguration
{
Import-DscResource -ModuleName nPSDesiredStateConfiguration
nService Wecsvc
{
Name = 'Wecsvc'
StartupType = 'Automatic'
State = 'Running'
}
} |
PowerShellCorpus/PowerShellGallery/DemosSept2015/0.1/Debugging/ProcessOwnerCredential.ps1 | ProcessOwnerCredential.ps1 | $ScriptPath = Split-Path $MyInvocation.MyCommand.Path
configuration ProcessOwnerCredential
{
Import-DscResource -ModuleName PSDesiredStateConfiguration
Script owner
{
GetScript = {@{}}
SetScript = {$p = (Get-Process -id $pid);
$info = (D:\Nana\Official\git\De... |
PowerShellCorpus/PowerShellGallery/DemosSept2015/0.1/Debugging/ServiceConfigurationClasses.ps1 | ServiceConfigurationClasses.ps1 | configuration ServiceConfigurationClasses
{
Import-DscResource -ModuleName nServiceManager
nService Wecsvc
{
Name = 'Wecsvc'
StartupType = 'Automatic'
State = 'Running'
}
} |
PowerShellCorpus/PowerShellGallery/DemosSept2015/0.1/Debugging/Demo.ps1 | Demo.ps1 | $ScriptPath = Split-Path $MyInvocation.MyCommand.Path
. "$ScriptPath\..\0-CommonInit.ps1"
# here is a sample resource - nService
psedit "$env:ProgramFiles\windowspowershell\modules\nPSDesiredStateConfiguration\DSCResources\Nana_nService\Nana_nService.psm1"
# copy a buggy resource to demo debugging
copy "$env:P... |
PowerShellCorpus/PowerShellGallery/DemosSept2015/0.1/DSCaaS/Azure.Subscription.Settings.ps1 | Azure.Subscription.Settings.ps1 | $ScriptPath = Split-Path $MyInvocation.MyCommand.Path
@{
SubscriptionName = 'Azure Extension Test' # Name of the subscription to use for azure cmdlets
StorageAccountName = 'nanapsconfdemoap' # Azure storage account name
#StorageAccountKey = 'FI5Irwba8oHU... |
PowerShellCorpus/PowerShellGallery/DemosSept2015/0.1/DSCaaS/Features.ps1 | Features.ps1 | configuration Features
{
Import-DscResource -ModuleName PSDesiredStateConfiguration
node localhost
{
WindowsFeature IIS
{
Name = 'Web-Server'
Ensure = 'Present'
}
}
} |
PowerShellCorpus/PowerShellGallery/DemosSept2015/0.1/DSCaaS/Demo.ps1 | Demo.ps1 | $ScriptPath = Split-Path $MyInvocation.MyCommand.Path
. "$ScriptPath\1-CommonInit.ps1"
# Load configuration Settings
Write-Verbose "Loading subscription settings '$ScriptPath\Azure.Subscription.Settings.ps1'"
$Settings = (& "$ScriptPath\Azure.Subscription.Settings.ps1")
# get the registration information f... |
PowerShellCorpus/PowerShellGallery/DemosSept2015/0.1/DSCaaS/1-CommonInit.ps1 | 1-CommonInit.ps1 | [CmdletBinding()]
param()
$CommonInit1Path = Split-Path $MyInvocation.MyCommand.Path
. "$CommonInit1Path\..\0-CommonInit.ps1"
$VerbosePref = $false
if ($PSBoundParameters.ContainsKey('Verbose'))
{
$VerbosePref = $true
}
Import-Module -Name Azure -Verbose:$false -ErrorVariable ev -ErrorAction Silently... |
PowerShellCorpus/PowerShellGallery/Statistics/1.1.63/Measure-Object.ps1 | Measure-Object.ps1 | function Measure-Object {
[CmdletBinding()]
Param(
[Parameter(Mandatory)]
[ValidateNotNullOrEmpty()]
[array]
$Data
,
[Parameter(Mandatory)]
[ValidateNotNullOrEmpty()]
[string]
$Property
)
Process {
#region Percentiles requi... |
PowerShellCorpus/PowerShellGallery/Statistics/1.1.63/Get-ExampleTimeSeries.ps1 | Get-ExampleTimeSeries.ps1 | function Get-ExampleTimeSeries {
[CmdletBinding()]
param(
[int]
$Count = 100
,
[datetime]
$Start
,
[datetime]
$End = (Get-Date)
,
[int]
$IntervalDays = 7
)
if (-Not $Start) {
$Start = $End.AddDays(-1 * $Inte... |
PowerShellCorpus/PowerShellGallery/Statistics/1.1.63/Show-Measurement.ps1 | Show-Measurement.ps1 | function Show-Measurement {
[CmdletBinding()]
Param(
[Parameter(Mandatory)]
[ValidateNotNullOrEmpty()]
[object]
$InputObject
,
[Parameter()]
[ValidateNotNullOrEmpty()]
[int]
$Width = $( if ($Host.UI.RawUI.MaxWindowSize.Width) { $Host.UI.Raw... |
PowerShellCorpus/PowerShellGallery/Statistics/1.1.63/Get-Histogram.ps1 | Get-Histogram.ps1 | function Get-Histogram {
[CmdletBinding(DefaultParameterSetName='BucketCount')]
Param(
[Parameter(Mandatory)]
[ValidateNotNullOrEmpty()]
[array]
$Data
,
[Parameter(Mandatory)]
[ValidateNotNullOrEmpty()]
[string]
$Property
,
... |
PowerShellCorpus/PowerShellGallery/Statistics/1.1.63/Get-InterarrivalTime.ps1 | Get-InterarrivalTime.ps1 | function Get-InterarrivalTime {
[CmdletBinding()]
Param(
[Parameter(Mandatory,ValueFromPipeline)]
[ValidateNotNullOrEmpty()]
[array]
$InputObject
,
[Parameter(Mandatory)]
[ValidateNotNullOrEmpty()]
[string]
$Property
,
[Para... |
PowerShellCorpus/PowerShellGallery/Statistics/1.1.63/ConvertFrom-PrimitiveType.ps1 | ConvertFrom-PrimitiveType.ps1 | function ConvertFrom-PrimitiveType {
[CmdletBinding()]
param(
[Parameter(Mandatory,ValueFromPipeline)]
[ValidateNotNullOrEmpty()]
$InputObject
)
Process {
Write-Debug ('[{0}] Entered process block' -f $MyInvocation.MyCommand)
$InputObject | ForEach-Object {
... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.