en-US/about_IniSettingsFile.help.txt

.NAME
    IniSettingsFile
 
# Description
     
    The resource is used to add, set or clear entries in Windows INI
    settings files.
     
.PARAMETER Path
    Key - String
    The path to the INI settings file to set the entry in.
 
.PARAMETER Section
    Key - String
    The section to add or set the entry in.
 
.PARAMETER Key
    Key - String
    The name of the key to add or set in the section.
 
.PARAMETER Type
    Write - String
    Allowed values: Text, Secret
    Specifies the value type that contains the value to set the entry to. Defaults to 'Text'.
 
.PARAMETER Text
    Write - String
    The text to set the entry value to. Only used when Type is set to 'Text'.
 
.PARAMETER Secret
    write - String
    The secret text to set the entry value to. Only used when Type is set to 'Secret'.
 
PSScriptInfo
.VERSION 1.0.0
.GUID 389e1516-5961-4b13-b698-62fbfb8c1107
.AUTHOR Daniel Scott-Raynsford
.COMPANYNAME
.COPYRIGHT (c) 2018 Daniel Scott-Raynsford. All rights reserved.
.TAGS DSCConfiguration
.LICENSEURI https://github.com/PlagueHO/FileContentDsc/blob/master/LICENSE
.PROJECTURI https://github.com/PlagueHO/FileContentDsc
.ICONURI
.EXTERNALMODULEDEPENDENCIES
.REQUIREDSCRIPTS
.EXTERNALSCRIPTDEPENDENCIES
.RELEASENOTES First version.
.PRIVATEDATA 2016-Datacenter,2016-Datacenter-Server-Core
 
 
#Requires -module FileContentDsc
 
 
    .DESCRIPTION
    Set the `Level` entry in the [Logging] section to `Information`
    in the file `c:\myapp\myapp.ini`.
 
Configuration IniSettingsFile_SetPlainTextEntry_Config
{
    Import-DSCResource -ModuleName FileContentDsc
 
    Node localhost
    {
        IniSettingsFile SetLogging
        {
            Path = 'c:\myapp\myapp.ini'
            Section = 'Logging'
            Key = 'Level'
            Text = 'Information'
        }
    }
}
 
PSScriptInfo
.VERSION 1.0.0
.GUID e1cbce56-1760-4208-b2dd-45cea4e87ab7
.AUTHOR Daniel Scott-Raynsford
.COMPANYNAME
.COPYRIGHT (c) 2018 Daniel Scott-Raynsford. All rights reserved.
.TAGS DSCConfiguration
.LICENSEURI https://github.com/PlagueHO/FileContentDsc/blob/master/LICENSE
.PROJECTURI https://github.com/PlagueHO/FileContentDsc
.ICONURI
.EXTERNALMODULEDEPENDENCIES
.REQUIREDSCRIPTS
.EXTERNALSCRIPTDEPENDENCIES
.RELEASENOTES First version.
.PRIVATEDATA 2016-Datacenter,2016-Datacenter-Server-Core
 
 
#Requires -module FileContentDsc
 
 
    .DESCRIPTION
    Set the `ConnectionString` entry in the [Database] section to the password
    provided in the $Secret credential object in the file `c:\myapp\myapp.ini`.
 
Configuration IniSettingsFile_SetSecretTextEntry_Config
{
    param
    (
        [Parameter()]
        [ValidateNotNullorEmpty()]
        [PSCredential]
        $Secret
    )
 
    Import-DSCResource -ModuleName FileContentDsc
 
    Node localhost
    {
        IniSettingsFile SetConnectionString
        {
            Path = 'c:\myapp\myapp.ini'
            Section = 'Database'
            Key = 'ConnectionString'
            Type = 'Secret'
            Secret = $Secret
        }
    }
}