I have a standalone 2013 SharePoint installed on a Win2012R2 which I am playing with.
When I click "Home" in the navigation this is my URL
http://winsrv01/_layouts/15/start.aspx#/
I created a new library name "SharePoint Doc Lib".
When I click on that library this is my URL:
http://winsrv01/_layouts/15/start.aspx#/Sharepoint%20Doc%20Lib/Forms/AllItems.aspx
Now I what to upload a file to this document library with powershell. Looking at this how to it seems pretty easy:
# Set the variables
$WebURL = “http://portal.contoso.com/sites/stuff”
$DocLibName = “Docs”
$FilePath = “C:\Docs\stuff\Secret Sauce.docx”
# Get a variable that points to the folder
$Web = Get-SPWeb $WebURL
$List = $Web.GetFolder($DocLibName)
$Files = $List.Files
# Get just the name of the file from the whole path
$FileName = $FilePath.Substring($FilePath.LastIndexOf("\")+1)
# Load the file into a variable
$File= Get-ChildItem $FilePath
# Upload it to SharePoint
$Files.Add($DocLibName +"/" + $FileName,$File.OpenRead(),$false)
$web.Dispose()
- But what will my URL be?
- What is that
_layoutsall about? - What should the direct link to my library be?
http://winsrv01. The_layoutsbit is a result of the Minimal Download Strategy feature. Direct link to library would behttp://winsrv01/Sharepoint%20Doc%20Lib