Skip to content

Commit e43a73e

Browse files
authored
Example 7: wrong parameter, should be Path instead of filename
Got an InvalidArgument : (:) [Add-PnPFile], ParameterBindingException with Filename.
1 parent 3b190d7 commit e43a73e

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

sharepoint/sharepoint-ps/sharepoint-pnp/Add-PnPFile.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -92,7 +92,7 @@ This will add a file sample.docx to the Documents folder and will set the Modifi
9292

9393
### ------------------EXAMPLE 7------------------
9494
```powershell
95-
Add-PnPFile -FileName sample.docx -Folder "Documents" -NewFileName "differentname.docx"
95+
Add-PnPFile -Path sample.docx -Folder "Documents" -NewFileName "differentname.docx"
9696
```
9797

9898
This will upload a local file sample.docx to the Documents folder giving it the filename differentname.docx on SharePoint
@@ -335,4 +335,4 @@ Accept pipeline input: False
335335
336336
## RELATED LINKS
337337
338-
[SharePoint Developer Patterns and Practices](https://aka.ms/sppnp)
338+
[SharePoint Developer Patterns and Practices](https://aka.ms/sppnp)

0 commit comments

Comments
 (0)