How to work on specific sites in SharePoint Online using PowerShell

%3CLINGO-SUB%20id%3D%22lingo-sub-2440787%22%20slang%3D%22en-US%22%3EHow%20to%20work%20on%20specific%20sites%20in%20SharePoint%20Online%20using%20PowerShell%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-2440787%22%20slang%3D%22en-US%22%3E%3CP%3EI%20am%20relatively%20new%20to%20managing%20SharePoint%20Online%20using%20PowerShell%20and%20am%20wondering%20a%20few%20questions...%3C%2FP%3E%3CP%3E-%20When%20I%20connect%2C%20what%20is%20my%20current%20path%3F%20I%20say%20this%20because%20I%20want%20to%20manage%20multiple%20sites%20and%20not%20sure%20how%20to%20specify%20in%20a%20PowerShell%20script%20which%20site%20I%20want%20to%20work%20in.%3C%2FP%3E%3CP%3E-%20How%20can%20I%20add%20lists%20to%20a%20specific%20site%3F%20If%20I%20have%20%22Site%20A%22%2C%20%22Site%20B%22%2C%20and%20%22Site%20C%22%2C%20once%20I%20connect%2C%20how%20do%20I%20have%20PowerShell%20create%20a%20list%20in%20let's%20say%20%22Site%20B%22%20and%20not%20%22Site%20A%22%3F%3C%2FP%3E%3CP%3E-%20If%20I%20don't%20specify%20a%20site%20when%20I%20add%20a%20list%20in%20SharePoint%20Online%20using%20PowerShell%2C%20How%20can%20I%20see%20that%20list%3F%20I%20ran%20the%20PowerShell%20command%20to%20create%20a%20new%20list%20just%20after%20connecting%2C%20but%20I%20cannot%20find%20the%20list%20anywhere.%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-LABS%20id%3D%22lingo-labs-2440787%22%20slang%3D%22en-US%22%3E%3CLINGO-LABEL%3EAdmin%3C%2FLINGO-LABEL%3E%3CLINGO-LABEL%3EPowerShell%3C%2FLINGO-LABEL%3E%3CLINGO-LABEL%3ESharePoint%20Online%3C%2FLINGO-LABEL%3E%3CLINGO-LABEL%3ESites%3C%2FLINGO-LABEL%3E%3C%2FLINGO-LABS%3E
New Contributor

I am relatively new to managing SharePoint Online using PowerShell and am wondering a few questions...

- When I connect, what is my current path? I say this because I want to manage multiple sites and not sure how to specify in a PowerShell script which site I want to work in.

- How can I add lists to a specific site? If I have "Site A", "Site B", and "Site C", once I connect, how do I have PowerShell create a list in let's say "Site B" and not "Site A"?

- If I don't specify a site when I add a list in SharePoint Online using PowerShell, How can I see that list? I ran the PowerShell command to create a new list just after connecting, but I cannot find the list anywhere.

0 Replies