Skip to content

Instantly share code, notes, and snippets.

@navancommits
Last active March 11, 2024 09:06
enableclone patch
[CmdletBinding()]
Param
(
[string] $enableClone="true"
)
$files = Get-ChildItem -Path . -Filter xxx.Foundation.ItemCloning.Setting.config -recurse | ForEach-Object {$_.FullName}
foreach ($path in $files) {
Copy-Item -Path .\template\xxx.Foundation.ItemCloning.Setting.config -Destination $path -Recurse -Force
(Get-Content -Path $path -Encoding UTF8).Replace("<ENABLECLONE>", $enableClone) `
| Set-Content -Path $path -Encoding UTF8
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment