I am using the following code/function to add groups to a site:
function Create-SPGroupInWeb
{
param ($url, $groupName, $permissionLevel, $description)
try{
$web = Get-SPWeb -Identity $url
if($web -ne $null){
if ($web.SiteGroups[$groupName] -ne $null)
{
write-Host -f red "Group $groupName already exists!"
}
else
{
$web.SiteGroups.Add($groupName, $web.Site.Owner, $web.Site.Owner, $description)
$group = $web.SiteGroups[$groupName]
$roleAssignment = new-object Microsoft.SharePoint.SPRoleAssignment($group)
$roleDefinition = $web.Site.RootWeb.RoleDefinitions[$permissionLevel]
$roleAssignment.RoleDefinitionBindings.Add($roleDefinition)
$web.RoleAssignments.Add($roleAssignment)
$web.Update()
write-Host "Group $groupName created successfully"
}
$web.Dispose()
}
}
catch [System.Exception]
{
write-host -f red $_.Exception.ToString()
}
}
Create-SPGroupInWeb -url "http://my-webApp:port/" -groupName "New Group" -permissionLevel "Read" -description "My New Group Description"
Now, this works perfectly as is. However, this does not like it if I use HTML Code...
The Issue is: It creates the description as Plain Text...
Q) How do I get it to accept or convert the Description to HTML?
Original Script used from: Create Site Permission Groups and Add Users for SharePoint - Powershell
Thanks