Last active
May 29, 2021 14:43
-
-
Save ankitjoshi/de5b99648c70f62956f6025d36acaf2b to your computer and use it in GitHub Desktop.
Get Site Dictionary Domain Script (SXA Add Dictionary Script #2)
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function Get-DictionaryDomain { | |
[CmdletBinding()] | |
param( | |
[Parameter(Mandatory=$true, ValueFromPipeline = $true, Position=0 )] | |
[Item]$Root | |
) | |
begin { | |
Import-Function Test-ItemIsDictionaryDomain | |
Write-Verbose "Cmdlet Get-DictionaryDomain - Begin" | |
} | |
process { | |
Write-Verbose "Cmdlet Get-DictionaryDomain - Process" | |
Get-ChildItem -Path $Root.Paths.Path -Recurse | ? { (Test-ItemIsDictionaryDomain $_ ) -eq $true } | Select-Object -First 1 | |
} | |
end { | |
Write-Verbose "Cmdlet Get-DictionaryDomain - End" | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment