Q:

Pass parameters with msbuild task

I am trying to create a build script, to migrate our build process from Cruise Control to jenkins, and I can't see how to get access to all the normal command line parameters when I call the MSBuild task.
For instance I would like to run the equivalent of
msbuild  common.sln    /p:Platform="$(MsBuildPlatformAnyCpu)" /p:Configuration=$(MsBuildConfiguration) /v:$(MsBuildVerbosity) /p:WarningLevel=$(MsBuildWarningLevel);OutputPath="$(ProjectBinariesFolder)" /fileLogger /flp1:logfile=$(ProjectBuildLogsFolder)\$(ProjectFile)_BuildErrors.txt;errorsonly /flp2:logfile=$(ProjectBuildLogsFolder)\$(ProjectFile)_BuildWarnings.txt;warningsonly /flp3:LogFile=$(ProjectBuildLogsFolder)\$(ProjectFile)_Build.txt;Verbosity=diagnostic

This is my msbuild file:
<Project xmlns="http://schemas.microsoft.com/developer/msbuild/2003" ToolsVersion="4.0" DefaultTargets="Build">
 <PropertyGroup>
    <JenkinsBuildFolder>C:\Program Files (x86)\Jenkins\jobs\build2\workspace</JenkinsBuildFolder>
    <ProjectSourcesFolder>$(JenkinsBuildFolder)\Sources</ProjectSourcesFolder>
    <ProjectBinariesFolder>$(JenkinsBuildFolder)\Binaries</ProjectBinariesFolder>
    <ProjectBuildLogsFolder>$(JenkinsBuildFolder)\BuildLogs</ProjectBuildLogsFolder>
    <ProjectTestLogsFolder>$(JenkinsBuildFolder)\TestLogs</ProjectTestLogsFolder>

    <ProjectGuid>{F8A25B4A-589A-4D3D-A568-4700FD776250}</ProjectGuid>
</PropertyGroup>
<ItemGroup>
<ProjectToBuild Include="Common.sln">
    <Properties>OutputPath=$(ProjectBinariesFolder);Configuration=Build</Properties>
</ProjectToBuild>

</ItemGroup>

<Target Name="Build">
  <MSBuild Projects="@(ProjectToBuild)"  />         
</Target>

</Project>

However I have no idea how to get the task  equivalent properties of the command line switches /v /filelogger etc

A:

You can't.
/p is used to inject properties into the build from the command line. The other command line options like /v are specific to the build process and you cannot move them to the proj file. 
Note that there was probably good reason why your Cruise Control setup specified those /p params. I suspect it is because the values for those params are defined in Cruise Control and it is a way to parametrize the build - so one could kick off a build and say $(MsBuildConfiguration) = "Debug". You may want to do the same with Jenkins and not hardcore the values.
As for the /p params, Jenkins allows you pass parameters to msbuild - see Default parameters below.

