I'm building a Powershell script to manage distribution groups and contacts.
But when I create a new distributiongroup
function GroupAddGroup([string] $GroupName)
{
$newGroup = New-DistributionGroup $GroupName;
return $newGroup.Name
}
I have to wait something between 5 and 60 seconds until I can access the group (adding members and so on).
The question is: why do I have to wait? And what is the best way to solve it (perhabs one time it needs 65 soconds or 300 seconds....)?