How to check if url is SharePoint Site or Document LIbrary Url or Item level or folder URL?

%3CLINGO-SUB%20id%3D%22lingo-sub-1985974%22%20slang%3D%22en-US%22%3EHow%20to%20check%20if%20url%20is%20SharePoint%20Site%20or%20Document%20LIbrary%20Url%20or%20Item%20level%20or%20folder%20URL%3F%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-1985974%22%20slang%3D%22en-US%22%3E%3CP%3EHello%26nbsp%3B%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EIs%20there%20any%20way%20to%20check%20if%20url%20is%20SharePoint%20Site%20URL%20or%20Document%20Library%20URL%20or%20Folder%20Url%20or%20Item%20level%20URL%20using%20PowerShell%3F%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EI%20also%20want%20to%20check%20if%20user%20enter%20url%20like%26nbsp%3B%20%3CA%20href%3D%22https%3A%2F%2Fsitename.com%2Fsub%2Fdefault.aspx%22%20target%3D%22_blank%22%20rel%3D%22noopener%20nofollow%20noopener%20noreferrer%20noopener%20noreferrer%22%3Ehttps%3A%2F%2Fsitename.com%2Fsub%2Fdefault.aspx%3C%2FA%3E%26nbsp%3Bor%20%3CA%20href%3D%22https%3A%2F%2Fsitename.com%2Fsub%2Fhomegroup.aspx%22%20target%3D%22_blank%22%20rel%3D%22noopener%20nofollow%20noopener%20noreferrer%20noopener%20noreferrer%22%3Ehttps%3A%2F%2Fsitename.com%2Fsub%2Fhomegroup.aspx%3C%2FA%3E%26nbsp%3Bor%20%3CA%20href%3D%22https%3A%2F%2Fsitename.com%2Fsub%22%20target%3D%22_blank%22%20rel%3D%22noopener%20nofollow%20noopener%20noreferrer%20noopener%20noreferrer%22%3Ehttps%3A%2F%2Fsitename.com%2Fsub%3C%2FA%3E.%20I%20want%20it%20to%20return%20as%20%3CA%20href%3D%22https%3A%2F%2Fsitename.com%2Fsub%22%20target%3D%22_blank%22%20rel%3D%22noopener%20nofollow%20noopener%20noreferrer%20noopener%20noreferrer%22%3Ehttps%3A%2F%2Fsitename.com%2Fsub%3C%2FA%3E%26nbsp%3Busing%20PowerShell.%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3ESorry%20If%20am%20asking%20basic%20questions.%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3ERegards%3C%2FP%3E%3CP%3EAvian%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-LABS%20id%3D%22lingo-labs-1985974%22%20slang%3D%22en-US%22%3E%3CLINGO-LABEL%3EPowerShell%3C%2FLINGO-LABEL%3E%3CLINGO-LABEL%3ESharePoint%20Online%3C%2FLINGO-LABEL%3E%3CLINGO-LABEL%3ESharePoint%20Server%3C%2FLINGO-LABEL%3E%3C%2FLINGO-LABS%3E
Frequent Contributor

Hello 

 

Is there any way to check if url is SharePoint Site URL or Document Library URL or Folder Url or Item level URL using PowerShell?

 

I also want to check if user enter url like  https://sitename.com/sub/default.aspx or https://sitename.com/sub/homegroup.aspx or https://sitename.com/sub. I want it to return as https://sitename.com/sub using PowerShell.

 

Sorry If am asking basic questions.

 

Regards

Avian

0 Replies