I have used the SharePoint structural navigation.
I need to check the navigation node is exist or not, so I need to get all the navigation nodes using PowerShell.
How can this be done?
User TopnavigationBar
property from $web.Navigation
. It will load all nodes from global navigation.
Use below code:
$SPWeb=Get-SPWeb "Url"
$topnavigation = $SPWeb.Navigation.TopNavigationBar
foreach($node in $topnavigation)
{
$node.Title
//Your logic
}