Consultant - SharePoint | Office 365 | Azure | Nintex | SPFx | Office Add-In | Power Platform
Tuesday, 20 August 2013
Tuesday, 13 August 2013
SharePoint Discussion Board Customization with Data View Web Part
User want to customization in SharePoint Discussion Board using SharePoint Designer like the below image:-
For that you should maintain two column: -
-- Name: [like-Test_01] with Hyperlink the item.
-- Limited Body: [like-Test by Rintu Mondal].
-- Add Comment : For add the new comment in discussion board.
Following are the steps for creating the discussion board:-
1. Add one Empty Data View Web Part in a page.
2. Select data source with two column (Name and Limited Body).
3. Change code just
For that you should maintain two column: -
-- Name: [like-Test_01] with Hyperlink the item.
-- Limited Body: [like-Test by Rintu Mondal].
-- Add Comment : For add the new comment in discussion board.
Following are the steps for creating the discussion board:-
1. Add one Empty Data View Web Part in a page.
2. Select data source with two column (Name and Limited Body).
3. Change code just
Wednesday, 7 August 2013
Delete SharePoint Custom Group Using PowerShell
Delete SharePoint Custom Group Using Power Sell Scirpt
Deleted SharePoint custom group names are fetching from Excel sheet.
- In Excel shell there is one column name is "Name".
Following is the power shell script code:
if ((Get-PSSnapin "Microsoft.SharePoint.PowerShell" -ErrorAction SilentlyContinue) -eq $null) {
Add-PSSnapin "Microsoft.SharePoint.PowerShell"
}
$count = 0
$contentWebAppServices = (Get-SPFarm).services |? {$_.typename -eq "Microsoft SharePoint Foundation Web Application"}
foreach($webApp in $contentWebAppServices.WebApplications)
{
write-host "Site Collections"
write-host ""
foreach ($site in $webApp.Sites)
{
$count++
write-host "Site Collections URL --> -->" $site.URL
write-host ""
write-host "SubSites"
write-host ""
if($site.AllWebs -ne 'null')
{
foreach ($web in $site.AllWebs)
{
$count++
write-host "SubSite URL --> --> -->" $web.URL
write-host ""
$spGroups = $Web.SiteGroups
for ($index = 0; $index -lt $spGroups.Count; $index++)
{
write-Host "groupname" $spGroups[$index].Name
$SharePointGroupName= import-csv "C:\Users\test1\Desktop\PowerShell Script\SharePointListName.csv"
$SharePointGroupName|ForEach-Object{
$groupname=$_.'NAME'
if ($spGroups[$index].Name -eq $groupname )
{
$spGroups.Remove($groupname)
Write-Host $groupname
$spweb.Update();
}
}
}
}
}
}
}
write-host "Total Count :" $count
Add-PSSnapin "Microsoft.SharePoint.PowerShell"
}
$count = 0
$contentWebAppServices = (Get-SPFarm).services |? {$_.typename -eq "Microsoft SharePoint Foundation Web Application"}
foreach($webApp in $contentWebAppServices.WebApplications)
{
write-host "Site Collections"
write-host ""
foreach ($site in $webApp.Sites)
{
$count++
write-host "Site Collections URL --> -->" $site.URL
write-host ""
write-host "SubSites"
write-host ""
if($site.AllWebs -ne 'null')
{
foreach ($web in $site.AllWebs)
{
$count++
write-host "SubSite URL --> --> -->" $web.URL
write-host ""
$spGroups = $Web.SiteGroups
for ($index = 0; $index -lt $spGroups.Count; $index++)
{
write-Host "groupname" $spGroups[$index].Name
$SharePointGroupName= import-csv "C:\Users\test1\Desktop\PowerShell Script\SharePointListName.csv"
$SharePointGroupName|ForEach-Object{
$groupname=$_.'NAME'
if ($spGroups[$index].Name -eq $groupname )
{
$spGroups.Remove($groupname)
Write-Host $groupname
$spweb.Update();
}
}
}
}
}
}
}
write-host "Total Count :" $count
Delete SharePoint List Using Powershell
Delete SharePoint List using Power shell Script
Deleted SharePoint list names are fetching from Excel sheet.
- In Excel shell there is one column name is "Name".
Following is the power shell script code
Following is the power shell script code
if ((Get-PSSnapin "Microsoft.SharePoint.PowerShell" -ErrorAction SilentlyContinue) -eq $null) {
Add-PSSnapin "Microsoft.SharePoint.PowerShell"
}
$count = 0
$contentWebAppServices = (Get-SPFarm).services |? {$_.typename -eq "Microsoft SharePoint Foundation Web Application"}
foreach($webApp in $contentWebAppServices.WebApplications)
{
write-host "Site Collections"
write-host ""
foreach ($site in $webApp.Sites)
{
$count++
write-host "Site Collections URL --> -->" $site.URL
write-host ""
write-host "SubSites"
write-host ""
if($site.AllWebs -ne 'null')
{
foreach ($web in $site.AllWebs)
{
$count++
write-host "SubSite URL --> --> -->" $web.URL
write-host ""
$lists = $web.Lists
for ($index = 0; $index -lt $lists.Count; $index++)
{
$SharePointListName= import-csv "C:\Users\test1\Desktop\PowerShell Script\SharePointListName.csv"
$SharePointListName|ForEach-Object{
$ListName=$_.'NAME'
if ($lists[$index].Title -eq $ListName)
{
$lists[$index].Delete()
Write-Host "Web = $web, List = $ListName "
$web.Update();
}
}
}
}
}
}
}
write-host "Total Count :" $count
Subscribe to:
Posts (Atom)