You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository was archived by the owner on Jan 19, 2021. It is now read-only.
Remarks="This will add a file sample.docx to the Documents folder and will set the Modified date to 1/1/2016, Created date to 1/1/2017 and the Modified By field to the user with ID 23. To find out about the proper user ID to relate to a specific user, use Get-PnPUser.",
Remarks="This will upload a local file sample.docx to the Documents folder giving it the filename differentname.docx on SharePoint",
46
+
SortOrder=7)]
46
47
47
48
publicclassAddFile:PnPWebCmdlet
48
49
{
@@ -57,10 +58,13 @@ public class AddFile : PnPWebCmdlet
57
58
58
59
[Parameter(Mandatory=true,ParameterSetName=ParameterSet_ASSTREAM,HelpMessage="Name for file")]
59
60
publicstringFileName=string.Empty;
61
+
62
+
[Parameter(Mandatory=false,ParameterSetName=ParameterSet_ASFILE,HelpMessage="Filename to give the file on SharePoint")]
63
+
publicstringNewFileName=string.Empty;
64
+
60
65
[Parameter(Mandatory=true,ParameterSetName=ParameterSet_ASSTREAM,HelpMessage="Stream with the file contents")]
61
66
publicStreamStream;
62
67
63
-
64
68
[Parameter(Mandatory=false,HelpMessage="If versioning is enabled, this will check out the file first if it exists, upload the file, then check it in again.")]
65
69
publicSwitchParameterCheckout;
66
70
@@ -109,14 +113,20 @@ public class AddFile : PnPWebCmdlet
0 commit comments