Quantcast
Channel: SharePoint 2010 - Development and Programming forum
Viewing all articles
Browse latest Browse all 11508

TermSet is not validating if it is exist?

$
0
0

Hello

I am creating termset using and before termset creation, I am trying to validate that termset is exist ot not. Let me know if I missing anything?

#Create a new term for the termset:
            $group=$termStore.Groups["Demo Term Set"]                         
            $termSet = $group.TermSets["Category"]
            if($termSet -ne $null) #if termset exists
            {
                Write-Host $termSet.Name" is already exist."
            }
            else #if termset not exists
            {      
                $termSet=$group.CreateTermSet($level2TermSetName)
                Write-Host $termSetNew " has Been Created"
            }
Aviani


Viewing all articles
Browse latest Browse all 11508

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>