Resources - wiltaylor/FCE GitHub Wiki

Resources

FCE.Windows.Core

This package contains all the core windows resources and gathers.

ChocolateyPackage

This resource installs a chocolatey package on the system.

This resource will also install Chocolatey if it is not present on the system.

Properties

Name Required Description
package yes Specify the name of the package to install.
version no Specific version of the package to install
source no Specifies the nuget package respository to install from. Default is chocolatey.org

ComputerName

This resource changes the name of the computer.

Properties

Name Required Description
name yes New name to set the computer to

Directory

Creates or deletes directories.

Properties

Name Required Description
path yes Path to directory to manipulate
ensure no Can be present or absent. Present creates a directory while absent will delete it

File

Creates or deletes files.

Properties

Name Required Description
path yes Path to file to manipulate
ensure no Can be present or absent. Present copies a file while absent will delete it
source no Path of file to copy. If you specify a url starting with http:// or https:// it will be downloaded.

Powershell

Allows you to specify 2 Powershell scripts. One to test for a condition and another to apply required changes.

Properties

Name Required Description
testscript yes Script to run during the test phase.
testpassstring yes string to look for in STDOut from testscript to determine if it was successful.
applyscript yes Script to run during the apply phase.
rebootonapply no Set to true if you want FCE to stop for a reboot after the apply script runs

PowershellSecurity

Sets Powershell execution policy.

Properties

Name Required Description
policy yes Must be set to allsigned, default, remotesigned, restricted, undefined or unrestricted
scope no Must be currentuser or localmachine. Defaults to currentuser.

Registry

Set or remove registry keys/values.

Note: If you don't specify values for registry values it will operate with the key instead.

Properties

Name Required Description
hive no hklm or hkcu. Setting it here will be default value for rows
key no default key path for rows

Rows Properties

Name Required Description
hive no hklm or hkcu
key no path to registry key.
name no name of registry value to set
value no Value to set registry value to.
ensure no present to create key or absent to remove. Defaults to present.
type no REG_SZ, REG_MULTI_SZ, REG_EXPAND_SZ, REG_DWORD or REG_QWORD

Restart

By default this causes FCE to exit and return 3010 to indicate a reboot.

Properties

Name Required Description
ForceReboot no If set to anything it will reboot the system with a 30 second time out (to give FCE enough time to exit).

Service

Controls windows services.

Properties

Name Required Description
name yes name of service to manipulate.
state yes stop or start
starttype yes Must be automatic, disabled or manual

WindowsFeature

Install or Remove windows features.

Properties

Name Required Description
name yes Name of windows feature.
ensure yes present to enable feature or absent to remove feature

WindowsInstaller

Installs or Removes windows installer package.

Properties

Name Required Description
path no Path to MSI package
transforms no List of transforms to apply during installation
extraarguments no Extra arguments to pass to msiexec after TRANSFORMS.
productcode yes Product code of MSI
ensure yes present will install MSI and absent will remove it.

WindowsUpdate

Installs windows updates. It will keep reporting Reboot Required till all patches are installed.

Rows are currently used to determine which patches to skip. By default patches with Windows Defender and Language Pack.

Note: It is recommended to skip Windows Defender updates as they are always available and will get Windows Update resource stuck in an infinite loop.

Rows Properties

Name Required Description
action yes Set to skip
patch yes text to search patch title for to skip.