Problem
You receive below error executing PowerShell command/script while connecting to SharePoint site.The term 'Get-SPweb' is not recognized as the name of a cmdlet, function, script file, or operable program. Check the spelling of the name, or if a path was included, verify that the path is correct and try again.
At line:1 char:10
+ ~~~~~~~~~
+ CategoryInfo : ObjectNotFound: (Get-SPWeb:String) [], CommandNotFoundException
+ FullyQualifiedErrorId : CommandNotFoundException
⛏️ How to fix ?
The Site Url seems to be correct, so there is no problem with the script.⚡️ SharePoint Management Shell
You need to start PowerShell as "Run as administrator"
⚡️ Windows PowerShell Console
If you directly run this PowerShell command from Windows PowerShell Console, the PowerShell module is not auto imported in console. Execute below command and then load the script.Add-PSSnapin Microsoft.Sharepoint.Powershell
$spWeb = Get-SPWeb "[SharePoint Site link]"
⚡️ Windows PowerShell ISE
Execute below command and then load the script.Add-PSSnapin Microsoft.Sharepoint.Powershell
$spWeb = Get-SPWeb "[SharePoint Site link]"
⚡️ SharePoint Online Management Shell
Get-SPWeb cmdlet is applicable only for SharePoint on-premise and will not work for SharePoint Online.Refer PowerShell SharePoint Online commands or PnP PowerShell commands for working with SPO.
Get-SPOSite -Identity [SharePoint Online Site link]
- Move Copy Migrate SharePoint OneDrive files folders to different site collection location
- How to generate client id and secret to register SharePoint App with OAuth
- How to share SharePoint site or document with all users in organization
- Get-ADUser PowerShell - Get AD user details using email address
- error CAML Query containing special characters
- Access URL for SharePoint Tenant Admin Center (Online Office 365)
- Fix SharePoint Error - The Managed Metadata Service or Connection is currently not available. The Application Pool or Managed Metadata Web Service may not have been started
- SharePoint - The URL is invalid. It may refer to a nonexistent file or folder, or refer to a valid file or folder that is not in the current Web.
- How to delete SharePoint List Item programmatically using C#.Net
- How to Share Microsoft SharePoint Site with Users or Groups
- JSON column formatting to preview SharePoint Online file on mouse hover
- SharePoint List redirect user after submitting form NewForm.aspx
- See actual SharePoint error exception modify web.config
- SharePoint Server 2016 IT Preview Deprecated Removed features
- How to create SharePoint Document Library
- How to Get or Set SharePoint Document ID _dlc_DocId using PowerShell
- How to disable SharePoint subsite creation option for owners
- PowerShell - How to use Try Catch Finally blocks for error exception handling (Windows/SharePoint)
- SharePoint error - Your organization doesn't allow sharing with users from this domain. Please contact your IT department for help. (OSE403)
- [Solved] SharePoint Search Internal server error exception
- How to wrap column text in SharePoint Online Modern List Grid View using JSON formatting
- How to extend retiring SharePoint 2010 Workflows and continue with Office 365
- Changed AD user display name showing old name in SharePoint
- How to hide or remove quick launch left navigation from SharePoint Online Modern site page
- How to enable anonymous public access for SharePoint Online site collection, file, folder without login ?
- How to Whitelist IP Address on GoDaddy Hosting? - HowTos
- How to enable disable SharePoint Developer Dashboard for tracing troubleshooting - SharePoint
- Twitch chat down, error loading data, content unavailable, streaming problem - News
- Two Buttons next to each other in Android Layout - Android
- Fix Error CAA50021 - Number of retry attempts exceeds expectation - Microsoft 365 Apps - Microsoft
- Change color of macOS terminal prompt - MacOS
- [Fix] Microsoft AADSTS900561: The endpoint only accepts POST requests. Received a GET request. - Microsoft
- Java JDBC Batch Update Example with PreparedStatement - Java