Monday, June 20, 2011

Power Shell .wsp deployment scripts for SharePoint 2010

STEP 1 :Copy the PowerShell scriptlet below and paste it in a notepad, modify your Site Collection URL in the code marked in red below and save it with a .ps1 extension.
=======================================================================
Add-PsSnapin Microsoft.SharePoint.PowerShell


#Site Collection URL - Give your site collection url in quotation marks
$SiteUrl="http://localhost"

#Do not modify anything in the script from here onwards
function Get-ScriptDirectory
{
$Invocation = (Get-Variable MyInvocation -Scope 1).Value
Split-Path $Invocation.MyCommand.Path
}

#solutions to deploy
$SolutionName="PrintListItem.wsp"
$SolutionPath = Join-Path (Get-ScriptDirectory) $SolutionName
echo "Extracting information from $SolutionPath"

$SolutionPath= $SolutionPath
$FeatureName="PrintListItem_Feature1"

#Feature name
$FeatureID= $(Get-SPFeature -limit all | ? {($_.displayname -eq $FeatureName)}).Id
$SingleSiteCollection = Get-SPSite $SiteUrl

#Admin service
$AdminServiceName = "SPAdminV4"
$IsAdminServiceWasRunning = $true;

if ($(Get-Service $AdminServiceName).Status -eq "Stopped")
{
$IsAdminServiceWasRunning = $false;
Start-Service $AdminServiceName
Write-Host 'SERVICE WAS STOPPED, SO IT IS NOW STARTED'
}

Write-Host 'DEACTIVATING FEATURE ...'

Disable-SPFeature -Identity $FeatureName -Url $SiteUrl -Confirm:$false
Write-Host 'FEATURE HAS BEEN DEACTIVATED SUCCESSFULLY.'

#Uninstall
Write-Host 'UNINSTALLING SOLUTION ...'

$Solution = Get-SPSolution | ? {($_.Name -eq $SolutionName) -and ($_.Deployed -eq $true)}

if ($Solution -ne $null)
{
if($Solution.ContainsWebApplicationResource)
{
Uninstall-SPSolution $SolutionName -AllWebApplications -Confirm:$false
}
else
{
Uninstall-SPSolution $SolutionName -Confirm:$false
}
}

while ($Solution.JobExists)
{
Start-Sleep 2
}

Write-Host 'SOLUTION HAS BEEN UNINSTALLED SUCCESSFULLY.'

Write-Host 'REMOVING SOLUTION ...'

if ($(Get-SPSolution | ? {$_.Name -eq $SolutionName}).Deployed -eq $false)
{
Remove-SPSolution $SolutionName -Confirm:$false

Write-Host 'SOLUTION HAS BEEN REMOVED SUCCESSFULLY.'
}

Write-Host 'ADDING SOLUTION ...'

Add-SPSolution $SolutionPath | Out-Null

Write-Host 'SOLUTION HAS BEEN ADDED SUCCESSFULLY.'

Write-Host 'DEPLOYING SOLUTION ...'

$Solution = Get-SPSolution | ? {($_.Name -eq $SolutionName) -and ($_.Deployed -eq $false)}

#use '-force' paramater to install all commands in this if statement

if(($Solution -ne $null) -and ($Solution.ContainsWebApplicationResource))
{
Install-SPSolution $SolutionName –AllwebApplications -GACDeployment -Force -Confirm:$false
}
else
{
Install-SPSolution $SolutionName -GACDeployment -Force -Confirm:$false
}

while ($Solution.Deployed -eq $false)
{
Start-Sleep 2
}

Write-Host 'SOLUTION HAS BEEN DEPLOYED SUCCESSFULLY.'

Write-Host 'ACTIVATING FEATURE ...'

if ($FeatureName -ne $null)
{
Enable-SPFeature -Identity $FeatureName -Url $SiteUrl -Confirm:$false
}
#message
Write-Host 'FEATURE HAS BEEN ACTIVATED SUCCESSFULLY.'


if (-not $IsAdminServiceWasRunning)
{
Stop-Service $AdminServiceName
}

Remove-PsSnapin Microsoft.SharePoint.PowerShell

Echo Finish


Step 2 :

Now create a new notepad file and copy the code mentioned below, and then save the below mentioned code in a .bat file to automate the PowerShell deployment.

cd /d %~dp0
powershell -noexit -file ".PrintListItemDeploymentScript.ps1" "%CD%"
pause

How to 2 : Deploy SharePoint 2010 Solutions (WSP) files from Team Foundation Server 2010 Build

In part one we configured our build machine, executed a basic build and then added some msbuild switches to out put a WSP file. Now we are going to custom the build template to allow us to execute a custom powershell script and deploy our SharePoint solution package on our build server. The steps are very involved and it was difficult to put them to words without being too wordy. If you need some assistance drop a comment on the post and I will try to get back to you. Hope you enjoy!

Step 4: Wire Up a Simple PowerShell script
Fire up notepad and type into it: Write-Host "Hello World!"

Save the file as HelloWorld.ps1.

1.Open the command prompt
2.To test the script the execution policy needs to be changed by executing the command: powershell set-executionpolicy remotesigned
3.Now execute the command: powershell "& 'C:\[PathToFile]\HelloWorld.ps1'"
Note: remember to replace the [PathToFile] with the actual path of the file

Verify the output says Hello World!

Now drop the PowerShell script into the root of your project and check it into Source Control. Next we need to customize the Build process template to accept a parameter to execute our PowerShell script.

Open up the Build Template again and navigate to the Process Tab. In here click the Show details down arrow under the Build process template: heading.



Click the New... button

Copy the Default Template and name your new file name SharePointDeployment.xaml; Click OK.



Save your Build Definition and then switch over to the Source Control Explorer. Beneath the Project you are working on should be a folder named BuildProcessTemplates. Take a look inside this folder to find your new build process template. Double click your new template to open up the workflow designer.

Locate the Try Catch Action which says "Try Compile, Test, and Associate Changesets and Work Items." I like to click the up arrows in the top right corner so this entire action is collapsed. This will make it easier to find your place in the future and add items.

Now, before we can start to add new elements to our workflow we need a way to indicate which script to run when the build executes. To do this, we will use an Argument. I like to think of arguments like constructor overloads. They can optionally be set when the build is executed. This is just one aspect of arguments, for now add a new one by clicking Arguments in the bottom right and scrolling down to the bottom row. The type should be string and direction should be in.



Now, go to the toobox in the visual studio and from the Control Flow group add an if statement just below the Try block we collapsed previously.

Click into the Condition text box and begin typing… whoa! Intellisense, now we are getting back to familiar ground. If you have a VB.NET background you will feel at home because this workflow is implemented using VB.NET. Your condition is checking if a DeploymentScript value was given so in VB we write "DeploymentScript IsNot Nothing".

Drop a Sequence activity into the Then box of our If statement which will encapsulate our actions. For the Sequence activity name it Start Deployment.

Now drop a ConvertWorkspaceItem activity into the Sequence activity, followed by an InvokeProcess activity.

Before we can use our DeploymentScript value we are passing into our build we need to convert it to something the build process can find in the file system. We use the ConvertWorkspaceItem activity to change our path to something the build will recognize. But we will need a variable to store the value. Variables are exactly what you think they are, variables like in any other coding language. They are scoped to a location so click on the Start Deployment Sequence activity and click Variables in the bottom left. Go to the bottom and create a new one named "DeploymentScriptFilename" of type String. Notice the scope is pre-set for you to Start Deployment.



Now, right-click on the ConvertWorkspaceItem and choose properties, set the properties like you see in the screenshot below.



This activity takes our Argument "DeploymentScript" and converts it to a path the build process can find and then stores it in the "DeploymentScriptFilename" variable. Now we are ready to execute the script.

Now, it is time to setup the properties of the InvokeProcess activity exactly like the screenshot below.



I've pulled the full text for the Arguments property out for you here: String.Format(" ""& '{0}'"" ", DeploymentScriptFilename)

To see the output of our elegant script, drop a WriteBuildMessage activitie below the handle standard output and handle error output. For the message properties set each one to be the value of the textbox immediately above the activity.



Save your changes; the workflow should look like this:


We need to set the value of the Argument "DeploymenScript" we created. Save and check-in the Deplo

Now it is time to save and check-in our build template and PowerShell script. Open Source Control Explorer and check-in the NewBuildProcessTemplate.xaml. In solution explorer right click on your project and choose Add Existing Item. Browse to the PowerShell script and click Add. It should appear in your project root now. Check the file into source control.

Open up your build definition to the Process tab and notice the new Misc grouping with the value DeploymentScript. Before we enter a value here navigate to the Workspace tab and verify there is an entry for the project you are currently working on. It should look something like $/FOLDER/ProjectName.

Go back to the process tab and type the path to your PowerShell script file into the DeploymentScript field (eg. $/FOLDER/ProjectName/HelloWorld.ps1).



Save your build definition and queue up a new build. Before submitting it, click the Parameters tab and change the Logging Verbosity to Detailed. This will give us the output of our PowerShell script file.


When the build finishes, expand the log and locate the Hello World message. Tip: you can watch the build by double clicking on it in the Queue.


Step 5: Wire Up a SharePoint Deployment PowerShell script
Once this is working, it is time to expand on our PowerShell Script to deploy the SharePoint solution. In order to do this we will need to have a fairly powerful SharePoint deployment script and know 2 things:

1.The location of the solution files
2.The solution file name
Let's dissect the script first. Comments are preceded with the # character. The solution does quite a few things.

1.Sets up some parameters which can be passed into the script and stores them in variables
2.Adds the SharePoint PowerShell snap-in so we have SharePoint script context
3.Checks for the solution in the solution store
4.Checks if the solution is deployed and retracts it
5.Removes the solution
6.Adds the solution
7.Deploys the solution
1: #Store the name of the file we will use this later to add the solution 2: 3: param ( $solutionName, $solutionFileLocation ) 4: 5: $solutionPackageName = [System.String]::Format("{0}", $solutionName) 6: 7: $path = [System.String]::Format("{0}", $solutionFileLocation) 8: 9: Add-PSSnapin Microsoft.SharePoint.PowerShell -ErrorAction "SilentlyContinue" 10: 11: write-host "Checking for solution:" $solutionPackageName 12: 13: $solution = Get-SPSolution | where-object {$_.Name -eq $solutionPackageName} 14: 15: if ($solution -ne $null) { 16: 17: write-host "Solution found" 18: 19: if ($solution.Deployed -eq $true) { 20: 21: write-host "Solution Installed, Uninstalling" 22: 23: Uninstall-SPSolution -Identity $solutionPackageName -Local -Confirm:$false 24: 25: } 26: 27: write-host "Solution Uninstalled" 28: 29: Remove-SPSolution -Identity $solutionPackageName -Confirm:$false 30: 31: write-host "Solution Removed" 32: 33: } 34: 35: write-host "Adding New Solution" 36: 37: Add-SPSolution -LiteralPath $path 38: 39: write-host "Installing Solution" 40: 41: Install-SPSolution -Identity $solutionPackageName -Local -GACDeployment 42: 43: write-host "Solution Installed"It is always a good idea to test scripts in the PowerShell ISE before adding them to your build. In my scenario I am deploying a Farm solution with GAC resources so my deployment script might be different from yours.

Now that we've dissected the script we are ready to add it to the project and deployment. Copy and paste the above script into a new PowerShell script file and add it to your project root as DeployFarmSolution.ps1 (remember to check it in).


Now to the two information challenges we face.

Solution File Names
I did not find a way to get these dynamically so I coded them into an Argument in the build process template. This gives me the flexibility of updating them from the GUI of the Build Definition if I decide to change the name. The name of the Argument I use is "SolutionName". It should look like the below screenshot.


To set the variable we need to save AND check-in the template. Then open up the build definition from Team Explorer by right-clicking on the Build and choosing Edit Build Definition. In the Process tab there should be another item in the Misc grouping named SolutionName. Put the name of the solution into this field (eg. Solution.name.wsp). While you are in here go ahead and change the DeployMent script Argument to be your new DeployFarmSolution PowerShell script.


Location of the Solution files
There is probably a better way to do this but I know solutions are copied into the Binaries directory right off of the root of the workspace. I can use the built in workspace variable to find its location and append the string literal "Binaries\SolutionName.wsp" to the end.

If you don't already, open up the Build Process Template (workflow designer) we created earlier and get the properties for the Execute Deployment Script action. Change the Arguments property value to be:
String.Format(" ""& '{0}' {1} '{2}\Binaries\{3}'"" ", DeploymentScriptFilename, SolutionName, BuildDirectory, SolutionName)

We are using the String.Format function to call our script {0}, pass in the solution name {1}, and finally concatenate the Build directory with the string literal "\Binaries\" and our solution name to get the full path to our solution file. It is that simple!

Go ahead and queue up another build with the Logging Verbosity set to detailed


I've used this process with a few modifications to execute multiple scripts which can be stored in a string[] Attribute. Here is a screenshot of the multiple deployment log.

How to 1 : Deploy SharePoint 2010 Solutions (WSP) files from Team Foundation Server 2010 Build

This article is a two part series which will explain how to Configure Team Build 2010 to Build a SharePoint Solution package and then deploy the solution package to a SharePoint server. In this scenario the build agent is running SharePoint Foundation 2010.

Step 1: Prepare the Build Machine
There are lots of good articles on MSDN which cover the basics of setting up a Build Environment. Once you are done preparing, the best pen test I have come across is to login to the build machine (as the build service account) and set it up exactly like you were going to develop on it. For instance, you would want to install:

•· SharePoint Foundation 2010 – or SharePoint Server 2010, whatever your shop is developing against
•· Visual Studio 2010 + Extensions for SharePoint Products
•· Any additional 3rd party libraries you use like NUnit
•· Grab the latest solutions and project files from Team Foundation’s Source Control
•· Configure the project to deploy to the server and try to deploy your solution
•· If everything builds, you are ready to proceed with deployment automation
Rather than re-create the content for creating a custom build I would recommend you take a look at this series of posts from Ewald Hofman. He put together some great information on customizing the Team Build process. I HEAVILY relied on his tutorials to get the build process going. You can either read his posts, specifically Part 1, Part 2, and Part 14. Or, I am going to attempt to summarize the necessary steps below. Now that the build machine is ready, let's move to the next setup.

Step 2: Wire Up a Basic Build
First we should make sure the build works. Navigate to Team Explorer and right-click on the Builds node for your project: choose New Build Definition…


Name it Build SharePoint, click on the Build Defaults section. Choose your Build Controller from the dropdown and put in the UNC path for where the built files will be placed. Leave the defaults for Triggers. If you don’t already have a workspace setup, then configure the locations for the projects you are going to build.

Click on the Process tab.


Verify the correct solution or project is selected in the Items to Build field. Go ahead and Save the Build and queue up a new build. It should output the assemblies for your project/solution into the drop folder.


Once the build finishes go ahead and double click the build to see the entire overview. Click the Open Drop Folder to view the output of the build. You might be asking, "Where is the Solution file?." That is our next task.


Step 3: Get a Solution Package
Right-click on your BuildSharePoint from Team Explorer and choose Edit Build Definition.


In the Process section, expand the Advanced grouping. Find the MSBuild Arguments field and enter /p:IsPackaging=true. Save the build definition and queue up another build. This time you should have a nice .wsp file in your drop folder.

Monday, April 11, 2011

SharePoint 2010 Interview Questions – IT Pro / Architect

Basic Intro SharePoint Architecture Questions
1) What are Web Applications in SharePoint?
An IIS Web site created and used by SharePoint 2010. Saying an IIS virtual server is also an acceptable answer.
2) What is an application pool?
A group of one or more URLs that are served by a particular worker process or set of worker processes.
3) Why are application pools important?
They provide a way for multiple sites to run on the same server but still have their own worker processes and identity.
4) What are zones?
Different logical paths (URLs meaning) of gaining access to the same SharePoint Web application.
5) What are Web Application Policies?
Enables security policy for users at the Web application level, rather than at the site collection or site level. Importantly, they override all other security settings.
6) What is a site collection?
A site collection contains a top-level website and can contain one or more sub-sites web sites that have the same owner and share administration settings.
7) What are content databases?
A content database can hold all the content for one or more site collections.
8) What is a site?
A site in SharePoint contains Web pages and related assets such as lists, all hosted within a site collection.
9) What are My Sites?
Specialized SharePoint sites personalized and targeted for each user.
10) What is the difference between Classic mode authentication and Claims-based authentication?
As the name implies, classic authentication supports NT authentication types like Kerberos, NTLM, Basic, Digest, and anonymous. Claims based authentication uses claims identities against a against a trusted identity provider.
11) When would you use claims, and when would you use classic?
Classic is more commonly seen in upgraded 2007 environments whereas claims are the recommended path for new deployments.
12) Describe the potential components for both a single server, and multiple servers, potentially several tiered farms:
A single-server SharePoint Server 2010 environment leverages a built-in SQL Server 2008 Express database. The problems with this environment is scalability, not being able to install the with built-in database on a domain controller, the database cannot be larger than 4 GB, and you cannot use User Profile Synchronization in a single server with built-in database installation.
An example of a multiple tier farm would be a three-tier topology, considered one of the more efficient physical and logical layouts to supports scaling out or scaling up and provides better distribution of services across the member servers of the farm. This is considered a good architecture since one can add Web servers to the Web tier, add app servers to the application tier, and add database servers to the database tier.
SharePoint Backup and Restore Questions
13) What are some of the tools that can be used when backing up a SharePoint 2010 environment?
SharePoint farm backup and recovery
SQL Server
System Center Data Protection Manager
14) What Microsoft tool can be used for incremental backups?
System Center Data Protection Manager
Managed Metadata Questions
15) What is Managed Metadata?
Managed metadata is a hierarchical collection of centrally managed terms that you can define, and then use as attributes for items.
16) What are Terms and Term Sets?
A term is a word or a phrase that can be associated with an item. A term set is a collection of related terms.
17) How do Terms And Term Sets relate to Managed Metadata?
Managed metadata is a way of referring to the fact that terms and term sets can be created and managed independently from the columns themselves.
18) Are there different types of Term Sets?
There are Local Term Sets and Global Term Sets, one created within the context of a site collection and the other created outside the context of a site collection, respectively.
19) How are terms created and used?
There are several ways; however the most common is to use the Term Store Management Tool.
20) How is Managed Metadata, and the related Term technology used?
Through the UI, the most common use is through the managed metadata list column which allows you to specify the term set to use. It also related to searching and enhancing the user search experience.
Sandbox Solutions Questions
21) What is a sandboxed solution?
Components that are deployed to run within the sandboxed process rather than running in the production Internet Information Services (IIS) worker process.
22) What are some examples of things that might run within the SharePoint sandbox?
Any of the following are acceptable answers:
Web Parts
Event receivers
Feature receivers
Custom Microsoft SharePoint Designer workflow activities
Microsoft InfoPath business logic
others….
23) Why are sandboxed solutions used?
Primarily because they promote high layers of isolation. By default they run within a rights-restricted, isolated process based around Code Access Security (CAS). Isolation is possible to increase with activities like running the sandboxing service on only specific SharePoint 2010 servers.
SharePoint Search Questions
24) What is a content source in relation to SharePoint search? What’s the minimum amount of content sources?
A content source is a set of options that you can use to specify what type of content is crawled, what URLs to crawl, and how deep and when to crawl. You must create at least one content source before a crawl can occur.
25) What is a search scope?
A search scope defines a subset of information in the search index. Users can select a search scope when performing a search.
26) What is a federated location with SharePoint search?
Federated locations provide information that exists outside of your internal network to your end-users.
27) How does managed metadata affect search?
Enhances the end-user search experience by mapping crawled properties to managed properties. Managed properties show up in search results and help users perform more successful queries.
28) What is query logging in SharePoint 2010?
Collects information about user search queries and search results that users select on their computers to improve the relevancy of search results and to improve query suggestions.
29) What authentication type does the SharePoint crawler use?
The crawl component requires access to content using NTLM authentication.
Services Architecture Questions
30) Please describe what a Service Application is in SharePoint 2010.
Service applications in SharePoint 2010 are a set of services that can possibly be shared across Web applications. Some of these services may or may not be shared across the SharePoint 2010 farm. The reason these applications are shared is the overall reduction of resources required to supply the functionality these services cultivate.
31) Please provide an example of one of these service applications.
Any of the below are acceptable answers:
Access Services
Business Data Connectivity service
Excel Services Application
Managed Metadata service
PerformancePoint Service Application
Search service
Secure Store Service
State service
Usage and Health Data Collection service
User Profile service
Visio Graphics Service
Web Analytics service
Word Automation Services
Microsoft SharePoint Foundation Subscription Settings Service
32) What are Service Application Groups used for?
Just provides a logical grouping of services that are scoped to a particular Web Application.
33) How are Service Applications deployed in terms of IIS (Internet Information Services)?
They are provisioned as a single Internet Information Services (IIS) Web site.
34) Explain how connections are managed with Service Applications.
A virtual entity is used that is referred to as a proxy, due to label in PowerShell.
35) What are some common examples of SharePoint 2010 services architectures, and what are the advantages of each design?
The three most popular designs are single farms with either a single service application group or multiple service application groups, or Enterprise services farms.
Single farms with a single service application group are generally the most common, and have the advantages of easy deployment, simple service application allocation, effective resource utilization and cohesive management.
Single farms with multiple service application groups is less common, and have the advantage of potential individual management of service applications as well as allowing data isolation, and while being more complex to deploy and maintain allows targeting of sites to particular service applications.
Enterprise Service Farms is pretty uncommon as it is a complete farm dedicated to Service Applications but promotes autonomous management and high levels of data isolation.
36) Are there any other type of relevant service architectures?
Depending on the environment requirements, a specialized farm can also be used in order to deploy specific services tailored to the organizational requirements which can aid in scaling out and conservation of resources.
37) What is the User Profile service?
Allows configuring and managing User profile properties, Audiences, Profile synchronization settings, organization browsing and management settings, and My Site settings.
38) What are User Profiles?
Aggregates properties from diverse identity content sources together to create unified and consistent profiles across an organization, used throughout the SharePoint environment.
39) What is Excel Services?
Allows sharing, securing, managing, and using Excel 2010 workbooks in a SharePoint Server Web site or document library. Excel Services consists of the Excel Calculation Services (ECS), Microsoft Excel Web Access (EWA), and Excel Web Services (EWS) components.
40) What is PerformancePoint Services?
Allows users to monitor and analyze a business by building dashboards, scorecards, and key performance indicators (KPIs).
41) What is Visio Services?
Allows users to share and view Microsoft Visio Web drawings. The service also enables data-connected Microsoft Visio 2010 Web drawings to be refreshed and updated from various data sources.
42) What is Access Services?
Allows users to edit, update, and create linked Microsoft Access 2010 databases that can be viewed and manipulated by using an internet browser, the Access client, or a linked HTML page.
43) What is the Secure Store Service (SSS)?
A secure database for storing credentials that are associated with application IDs
44) What is Content Deployment?
Content deployment enables you to copy content from a source site collection to a destination site collection.
Backup / DR Questions
45) Describe how redundancy can be built into a SharePoint environment. Please be specific in regards to any auxiliary components.
Multiple front-end web servers (WFE’s) can be deployed and correlated through Windows NLB or anything approach. Application servers can be deployed into the farm for a variety of purposes, depending on organizational requirements. Databases can be clustered or mirrored, again depending on requirements and environment.
46) From a basic standpoint, what is the difference between SQL clustering and mirroring?
Clustering provides a failover scenario whereby one or more nodes can be swapped as active depending on whether a node goes down. In mirroring, transactions are sent directly from a principal database and server to a mirror database to establish essentially a replica of the database.
Governance Questions
47) What Is Governance in terms of SharePoint 2010?
Governance is the set of policies, roles, responsibilities, and processes that guide, direct, and control how an organization’s business divisions and IT teams cooperate to achieve business goals.
48) What are some useful, OOB features of SharePoint that aid with governance of an environment?
Any of the below are acceptable answers. There are some others but these are the major ones that I generally look for from a candidate:
Site templates – consistent branding, site structure, and layout can be enforce a set of customizations that are applied to a site definition.
Quotas – limits to the amount of storage a site collection can use.
Locks - prevent users from either adding content to a site collection or using the site collection.
Web application permissions and policies – comprehensive security settings that apply to all users and groups for all site collections within a Web application.
Self-service site creation - enables users to create their own site collections, thus must be incorporated into a governance scheme.
Monitoring Questions
49) Describe the monitoring features that are baked into SharePoint 2010.
Diagnostic logging captures data about the state of the system, whereas health and usage data collection uses specific timer jobs to perform monitoring tasks, collecting information about:
Performance Counter Fata
Event Log Data
Timer Service Data
Metrics For Site Collections and Sites
Search Usage Data
General Workflow Questions
50) What is a declarative workflow? Can non-authenticated users participate in workflows?
Workflows created by using Microsoft SharePoint Designer 2010, the default setting enables deployment of declarative workflows. Yes, however you do not give non-authorized users access to the site. The e-mail message and attachments sent from notifications might contain sensitive information

Wednesday, March 30, 2011

Complete reference of all STSADM operations (with parameters) in MOSS 2007 SP1

This is an update to my complete reference of all STSADM operations in Microsoft Office SharePoint Server 2007, now including the changes in Service Pack 1. I repeated what I did for MOSS 2007 in MOSS 2007 SP1, using a little scripting to get the list of all commands for STSADM, including the options and parameters for each. Items new in SP1 are underlined. Please note that some defaults might be related to the way my server is configured.

  1. stsadm -o activatefeature {-filename | -name | -id } [-url ] [-force]
  2. stsadm -o activateformtemplate -url [-formid
    ] [-filename ]
  3. stsadm -o addalternatedomain -url -incomingurl -urlzone -resourcename
  4. stsadm -o addcontentdb -url -databasename [-databaseserver ] [-databaseuser ] [-databasepassword ] [-sitewarning ] [-sitemax ]
  5. stsadm -o adddataconnectionfile -filename [-webaccessible ] [-overwrite ] [-category ]
  6. stsadm -o add-ecsfiletrustedlocation -Ssp -Location -LocationType SharePoint|Unc|Http -IncludeChildren True|False [-SessionTimeout
  7. stsadm -o add-ecssafedataprovider -Ssp -ID -Type Oledb|Odbc|OdbcDsn [-Description ]
  8. stsadm -o add-ecstrusteddataconnectionlibrary -Ssp -Location [-Description ]
  9. stsadm -o add-ecsuserdefinedfunction -Ssp -Assembly -AssemblyLocation GAC|File [-Enable True|False] [-Description ]
  10. stsadm -o addexemptuseragent -name
  11. stsadm -o addpath -url -type
  12. stsadm -o addpermissionpolicy -url -userlogin -permissionlevel [-zone ] [-username ]
  13. stsadm -o addsolution -filename [-lcid ]
  14. stsadm -o addtemplate -filename