|
New-SPOFile
Creates a new list file within an existing List. New-SPOFile [-List [<SPOListPipeBind>]] -Web <SPOWebPipeBind> -File <String> [-Overwrite [<SwitchParameter>]] [-FieldValues [<PropertiesPipeBind>]] New-SPOFile [-Folder [<SPOFolder>]] -Web <SPOWebPipeBind> -File <String> [-Overwrite [<SwitchParameter>]] [-FieldValues [<PropertiesPipeBind>]] Parameters1 Parameter | Required | Type | Description |
---|
List | False | SPOListPipeBind | Specifies the List to add the file to. The type must be a valid absolute URL, in the form http://contoso.sharepoint.com/site_name/lists/list_name, or an SPOList object, Microsoft.SharePoint.Client.List object, List title, or GUID representing the List ID. | Web | True | SPOWebPipeBind | Specifies the identity of the Site containing the List to add the file to. The type must be a valid server relative URL, in the form /site_name, or an SPOWeb object, Microsoft.SharePoint.Client.Web object, or GUID representing the Site ID. | File | True | String | Specify the path to the file to add to the list. | Overwrite | False | SwitchParameter | Overwrite an existing file if present. | FieldValues | False | PropertiesPipeBind | The collection of field values to set where the key is the internal field name. The type must be a hash table where each key represents the name of a field whose value should be set to the corresponding key value (e.g., @{"Field1"="Value1";"Field2"="Value2"}). Alternatively, provide the path to a file with XML property settings (<Properties><Property Name="Name1">Value1</Property><Property Name="Name2">Value2</Property></Properties>). |
2 Parameter | Required | Type | Description |
---|
Folder | False | SPOFolder | Specifies the Folder to add the file to. The type must be a valid SPOFolder object. | Web | True | SPOWebPipeBind | Specifies the identity of the Site containing the List to add the file to. The type must be a valid server relative URL, in the form /site_name, or an SPOWeb object, Microsoft.SharePoint.Client.Web object, or GUID representing the Site ID. | File | True | String | Specify the path to the file to add to the list. | Overwrite | False | SwitchParameter | Overwrite an existing file if present. | FieldValues | False | PropertiesPipeBind | The collection of field values to set where the key is the internal field name. The type must be a hash table where each key represents the name of a field whose value should be set to the corresponding key value (e.g., @{"Field1"="Value1";"Field2"="Value2"}). Alternatively, provide the path to a file with XML property settings (<Properties><Property Name="Name1">Value1</Property><Property Name="Name2">Value2</Property></Properties>). |
Detailed DescriptionCreates a new list file within an existing List. Copyright 2016 Falchion Consulting, LLC > For more information on this cmdlet and others: > http://blog.falchionconsulting.com/ > Use of this cmdlet is at your own risk. > Gary Lapointe assumes no liability. Examples------------------EXAMPLE------------------ PS C:\> New-SPOFile -Web "/" -List "My List" -File "c:\myfile.txt" -FieldValues @{"Title"="My new file"}
|