Skip to content
This repository was archived by the owner on Jan 19, 2021. It is now read-only.

Commit 7ebefb3

Browse files
committed
Merge pull request #317 from OfficeDev/dev
May 2016 Release
2 parents 2c859e8 + ad10f08 commit 7ebefb3

File tree

272 files changed

+4412
-1439
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

272 files changed

+4412
-1439
lines changed
3.16 MB
Binary file not shown.
3.2 MB
Binary file not shown.
3.31 MB
Binary file not shown.

CONTRIBUTING.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -63,14 +63,14 @@ in a cmdlet that extens SPOWebCmdlet, the cmdlet will switch it's internal conte
6363
var context = SelectedWeb.Context;
6464
```
6565
###Cmdlets will have to work both on-premises and in the cloud
66-
You can use preprocessor variables ("CLIENTSDKV15" and "CLIENTSDKV16") to build different cmdlets for the different targets. In cases where it is not possible to provide functionality for either the
67-
cloud or on-premises, make sure to remove the full cmdlet from the compiled solution by having #IF(!CLIENTSDKV15) or #IF(CLIENTSDKV15) as the _first line of the cmdlet, before using statements.
66+
You can use preprocessor variables ("ONPREMISES" or "SP2013" and "SP2016") to build different cmdlets for the different targets. In cases where it is not possible to provide functionality for either the
67+
cloud or on-premises, make sure to remove the full cmdlet from the compiled solution by having #IF(!SP2013) or #IF(SP2013) as the _first line of the cmdlet, before using statements.
6868

6969
See the following example
7070

7171

7272
```csharp
73-
#if !CLIENTSDKV15
73+
#if !ONPREMISES
7474
using Microsoft.SharePoint.Client;
7575

7676
public class MyCmdlet : SPOWebCmdlet
@@ -80,7 +80,7 @@ public class MyCmdlet : SPOWebCmdlet
8080
#endif
8181
```
8282

83-
If only parts of a cmdlet require different behaviour based upon the different version of the SDK, you are recommended to use the #CLIENTSDKV15 preprocessor variable throughout your code to exclude or include certain code.
83+
If only parts of a cmdlet require different behaviour based upon the different version of the SDK, you are recommended to use the #ONPREMISES or other available preprocessor variable throughout your code to exclude or include certain code.
8484

8585
###Cmdlets will have to use common verbs
8686

CmdletHelpGenerator/CmdletInfo.cs

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,6 @@
1-
using System;
2-
using System.Collections.Generic;
3-
using System.Linq;
4-
using System.Text;
5-
using System.Threading.Tasks;
1+
using System.Collections.Generic;
62

7-
namespace OfficeDevPnP.PowerShell.CmdletHelpGenerator
3+
namespace SharePointPnP.PowerShell.CmdletHelpGenerator
84
{
95
public class CmdletInfo
106
{

CmdletHelpGenerator/CmdletParameterInfo.cs

Lines changed: 1 addition & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,4 @@
1-
using System;
2-
using System.Collections.Generic;
3-
using System.Linq;
4-
using System.Text;
5-
using System.Threading.Tasks;
6-
7-
namespace OfficeDevPnP.PowerShell.CmdletHelpGenerator
1+
namespace SharePointPnP.PowerShell.CmdletHelpGenerator
82
{
93
public class CmdletParameterInfo
104
{

CmdletHelpGenerator/CmdletSyntax.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
using System.Collections.Generic;
22

3-
namespace OfficeDevPnP.PowerShell.CmdletHelpGenerator
3+
namespace SharePointPnP.PowerShell.CmdletHelpGenerator
44
{
55
public class CmdletSyntax
66
{

CmdletHelpGenerator/Program.cs

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -3,15 +3,13 @@
33
using System.Linq;
44
using System.Management.Automation;
55
using System.Reflection;
6-
using System.Security.Cryptography;
76
using System.Text;
87
using System.Xml.Linq;
9-
using OfficeDevPnP.PowerShell.CmdletHelpAttributes;
10-
using System.Text.RegularExpressions;
8+
using SharePointPnP.PowerShell.CmdletHelpAttributes;
119
using System.Runtime.Serialization;
1210
using System.IO;
1311

14-
namespace OfficeDevPnP.PowerShell.CmdletHelpGenerator
12+
namespace SharePointPnP.PowerShell.CmdletHelpGenerator
1513
{
1614
class Program
1715
{

CmdletHelpGenerator/OfficeDevPnP.PowerShell.CmdletHelpGenerator.csproj renamed to CmdletHelpGenerator/SharePointPnP.PowerShell.CmdletHelpGenerator.csproj

Lines changed: 24 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -7,8 +7,8 @@
77
<ProjectGuid>{B53C2D73-E46B-47E1-BB80-C2A363A53FB3}</ProjectGuid>
88
<OutputType>Exe</OutputType>
99
<AppDesignerFolder>Properties</AppDesignerFolder>
10-
<RootNamespace>OfficeDevPnP.PowerShell.CmdletHelpGenerator</RootNamespace>
11-
<AssemblyName>OfficeDevPnP.PowerShell.CmdletHelpGenerator</AssemblyName>
10+
<RootNamespace>SharePointPnP.PowerShell.CmdletHelpGenerator</RootNamespace>
11+
<AssemblyName>SharePointPnP.PowerShell.CmdletHelpGenerator</AssemblyName>
1212
<TargetFrameworkVersion>v4.5</TargetFrameworkVersion>
1313
<FileAlignment>512</FileAlignment>
1414
<SccProjectName>
@@ -74,6 +74,26 @@
7474
<CodeAnalysisRuleSet>MinimumRecommendedRules.ruleset</CodeAnalysisRuleSet>
7575
<Prefer32Bit>true</Prefer32Bit>
7676
</PropertyGroup>
77+
<PropertyGroup Condition="'$(Configuration)|$(Platform)' == 'Debug16|AnyCPU'">
78+
<DebugSymbols>true</DebugSymbols>
79+
<OutputPath>bin\Debug16\</OutputPath>
80+
<DefineConstants>DEBUG;TRACE</DefineConstants>
81+
<DebugType>full</DebugType>
82+
<PlatformTarget>AnyCPU</PlatformTarget>
83+
<ErrorReport>prompt</ErrorReport>
84+
<CodeAnalysisRuleSet>MinimumRecommendedRules.ruleset</CodeAnalysisRuleSet>
85+
<Prefer32Bit>true</Prefer32Bit>
86+
</PropertyGroup>
87+
<PropertyGroup Condition="'$(Configuration)|$(Platform)' == 'Release16|AnyCPU'">
88+
<OutputPath>bin\Release16\</OutputPath>
89+
<DefineConstants>TRACE</DefineConstants>
90+
<Optimize>true</Optimize>
91+
<DebugType>pdbonly</DebugType>
92+
<PlatformTarget>AnyCPU</PlatformTarget>
93+
<ErrorReport>prompt</ErrorReport>
94+
<CodeAnalysisRuleSet>MinimumRecommendedRules.ruleset</CodeAnalysisRuleSet>
95+
<Prefer32Bit>true</Prefer32Bit>
96+
</PropertyGroup>
7797
<ItemGroup>
7898
<Reference Include="System" />
7999
<Reference Include="System.Core" />
@@ -101,9 +121,9 @@
101121
<None Include="App.config" />
102122
</ItemGroup>
103123
<ItemGroup>
104-
<ProjectReference Include="..\HelpAttributes\OfficeDevPnP.PowerShell.CmdletHelpAttributes.csproj">
124+
<ProjectReference Include="..\HelpAttributes\SharePointPnP.PowerShell.CmdletHelpAttributes.csproj">
105125
<Project>{fdd50bbd-ae78-4b10-9549-0566686719ab}</Project>
106-
<Name>OfficeDevPnP.PowerShell.CmdletHelpAttributes</Name>
126+
<Name>SharePointPnP.PowerShell.CmdletHelpAttributes</Name>
107127
</ProjectReference>
108128
</ItemGroup>
109129
<ItemGroup>

Commands/Admin/GetTenantSite.cs

Lines changed: 13 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -1,23 +1,22 @@
1-
#if !CLIENTSDKV15
1+
#if !ONPREMISES
22
using System.ComponentModel;
33
using System.Linq;
44
using System.Management.Automation;
55
using Microsoft.SharePoint.Client;
6-
using OfficeDevPnP.PowerShell.CmdletHelpAttributes;
7-
using OfficeDevPnP.PowerShell.Commands.Base;
8-
using OfficeDevPnP.PowerShell.Commands.Enums;
9-
using Resources = OfficeDevPnP.PowerShell.Commands.Properties.Resources;
6+
using SharePointPnP.PowerShell.CmdletHelpAttributes;
7+
using SharePointPnP.PowerShell.Commands.Base;
8+
using SharePointPnP.PowerShell.Commands.Enums;
9+
using Resources = SharePointPnP.PowerShell.Commands.Properties.Resources;
1010

11-
namespace OfficeDevPnP.PowerShell.Commands
11+
namespace SharePointPnP.PowerShell.Commands
1212
{
1313

1414
[Cmdlet(VerbsCommon.Get, "SPOTenantSite", SupportsShouldProcess = true)]
15-
[CmdletHelp(@"Office365 only: Uses the tenant API to retrieve site information.
16-
", Category = CmdletHelpCategory.TenantAdmin)]
17-
[CmdletExample(Code = @"
18-
PS:> Get-SPOTenantSite", Remarks = "Returns all site collections", SortOrder = 1)]
19-
[CmdletExample(Code = @"
20-
PS:> Get-SPOTenantSite -Url http://tenant.sharepoint.com/sites/projects", Remarks = "Returns information about the project site.",SortOrder = 2)]
15+
[CmdletHelp(@"Office365 only: Uses the tenant API to retrieve site information.", Category = CmdletHelpCategory.TenantAdmin)]
16+
[CmdletExample(Code = @"PS:> Get-SPOTenantSite", Remarks = "Returns all site collections", SortOrder = 1)]
17+
[CmdletExample(Code = @"PS:> Get-SPOTenantSite -Url http://tenant.sharepoint.com/sites/projects", Remarks = "Returns information about the project site.",SortOrder = 2)]
18+
[CmdletExample(Code = @"PS:> Get-SPOTenantSite -Detailed", Remarks = "Returns all sites with the full details of these sites", SortOrder = 3)]
19+
[CmdletExample(Code = @"PS:> Get-SPOTenantSite -IncludeOneDriveSites", Remarks = "Returns all sites including all OneDrive 4 Business sites", SortOrder = 4)]
2120
public class GetTenantSite : SPOAdminCmdlet
2221
{
2322
[Parameter(Mandatory = false, HelpMessage = "The URL of the site", Position = 0, ValueFromPipeline = true)]
@@ -27,10 +26,10 @@ public class GetTenantSite : SPOAdminCmdlet
2726
[Parameter(Mandatory = false, HelpMessage = "By default, not all returned attributes are populated. This switch populates all attributes. It can take several seconds to run. Without this, some attributes will show default values that may not be correct.")]
2827
public SwitchParameter Detailed;
2928

30-
[Parameter(Mandatory = false)]
29+
[Parameter(Mandatory = false, HelpMessage = "By default, the OneDrives are not returned. This switch includes all OneDrives. This can take some extra time to run")]
3130
public SwitchParameter IncludeOneDriveSites;
3231

33-
[Parameter(Mandatory = false)]
32+
[Parameter(Mandatory = false, HelpMessage = "When the switch IncludeOneDriveSites is used, this switch ignores the question shown that the command can take a long time to execute")]
3433
public SwitchParameter Force;
3534

3635
protected override void ExecuteCmdlet()

0 commit comments

Comments
 (0)