use sharepoint script to remove library and drop off libary

.\runScriptOnAllSites.ps1 -script .\remove_library.ps1

Script1:

<#
.SYNOPSIS
This is a wrapper script that recursively executes a
different script on all sites on server

.DESCRIPTION
This script can be used to perform amother script on all sites.
The url of each site is passed to the script that is called. The called
script needs to use the parameter to do something to that site.

.PARAMETER script
-script the full path to the script you wish to execute on all sites

.EXAMPLE
.\runScriptOnAllSites.ps1 -script C:\Scripts\MyScript.ps1

.LINK

http://get-spscripts.com/2011/04/managing-quick-launch-current.html

#>

param(
[Parameter(Position=0,mandatory=$true)]
[string]$script = $(throw “-script is required.”))

function RecurseSiteAndDoSomething() {
param([Microsoft.SharePoint.SPWeb]$SiteIdentity)
$thisUrl = $SiteIdentity.Url
$cmd = “$script "$thisUrl“”

#Necessary to call the script with parameter both from variables
Invoke-Expression -Command $cmd

if($SiteIdentity.Webs.Count -gt 0)
{
foreach($subWeb in $SiteIdentity.Webs)
{
RecurseSiteAndDoSomething -SiteIdentity $subWeb
}
}
}

$contentWebAppServices = (Get-SPFarm).services |
? {$_.typename -eq “Microsoft SharePoint Foundation Web Application”}

foreach($webApp in $contentWebAppServices.WebApplications)
{
Write-Output “Web Application: $($webApp.name)”
foreach($siteColl in $webApp.Sites)
{
Write-Output “Site Collection: $($siteColl.Url)”
RecurseSiteAndDoSomething -SiteIdentity $($siteColl.RootWeb)
}
}

 

Script 2:

<#
.SYNOPSIS
sCRIPT TO REMOVE DROP OFF LIBRARY FROM QUICKLAUNCH

.DESCRIPTION
This script can be used to remove the Drop Off Library from
the Quick Launch (current) Navigation

.PARAMETER url
-url

.EXAMPLE
.\rmDropOffQuickLaunch.ps1 http://www.yoursite.com/yoursubsite
#>

param(
[Parameter(Position=0,mandatory=$true)]
[string]$url = $(throw “-url is required.”))

$web = Get-SPweb $url
$pubWeb = [Microsoft.Sharepoint.Publishing.PublishingWeb]::GetPublishingWeb($Web)
$qlNav = $pubWeb.Navigation.CurrentNavigationNodes

$qlHeading = $qlNav | where { $_.Title -eq “Libraries” }
$qlLibraries = $qlHeading.Children
$qlDropOff = $qlLibraries | Where { $_.Title -eq “Drop Off Library”}

$qlDropOff | Select Title,ID
if($qlDropOff -ne $null)
{
$qlDropOff.delete()
}
else
{
write-host “Already turned off on $url”
}
$pubWeb.Update()

#Next, check to see if the Libraries heading has other children
$qlNav = $pubWeb.Navigation.CurrentNavigationNodes
$qlHeading = $qlNav | where { $_.Title -eq “Libraries” }
$qlLibraries = $qlHeading.Children
if($qlLibraries.Count -eq 0)
{
$qlHeading.delete()
}
else
{
$qlLibraries | Select Title,ID
$count = $qlLibraries.Count
write-host “Other Libraries are listed on $url. Count = $count”
}

$pubWeb.Update()
#$web.Dispose

 

 

 

Change the default width of parameters report server sharepoint webpart

De oplossing voor de parameter breedte in sharepoint is gevonden.

 

In de directory C:\Program Files\Common Files\Microsoft Shared\Web Server Extensions\14\TEMPLATE\LAYOUTS\ReportServer\styles\1033

Moet het volgende toegevoegd worden aan sqlrvdefault.css

 

SELECT {

font-size: 8pt;

font-family: Verdana;

width:200px

}

 

Daarna is alleen nog maar een IIS reset nodig.