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]
More Posts related to SharePoint,
- error CAML Query containing special characters
- [Solved] SharePoint Illegal operation attempted on a registry key that has been marked for deletion
- Trigger Flow on selected Listitem from SharePoint view - create button with JSON column formatting
- SharePoint Excel error - The workbook cannot be opened because it contains the following features that are not supported by Excel in the browser
- Send Email with attachment using SharePoint PowerShell, SMTP server
- How to show or hide columns in SharePoint Online List Library from
- SharePoint excel error - A problem occurred while connecting to the server. If the problem continues, contact your administrator.
- How to get SharePoint Online user details from person or group column using REST API
- How to get SharePoint List Item URL using PowerShell
- How to get the SharePoint Tenant Login URL
- Special character & not working with SharePoint REST API
- How to disable SharePoint subsite creation option for owners
- Managed Metadata error - The data returned from the tagging UI was not formatted correctly
- Deploy SharePoint wsp solution package using PowerShell
- How to create classic site in SharePoint Online
- See actual SharePoint error exception modify web.config
- 'Edit Document' Requires a Windows Sharepoint Services-compatible application and Microsoft Internet Explorer 6.0 or higher
- How to enable anonymous public access for SharePoint Online site collection, file, folder without login ?
- SharePoint installation error - Setup is unable to proceed due to the following error This product requires Microsoft .Net Framework 4.5
- How to add animated Gif to SharePoint Online Page
- [Solved] SharePoint Search Internal server error exception
- How to create SharePoint Document Library
- SharePoint - Use Today's Date Time in list view filter and calculated column
- How to redirect SharePoint Site Collection to different URL
- SharePoint error cannot connect to the configuration database
More Posts:
- Copy file from a remote server to current local directory system using SCP command - HowTos
- Java JDBC Connection with MySQL Driver in VS Code + Troubleshooting - Java
- How to extend retiring SharePoint 2010 Workflows and continue with Office 365 - SharePoint
- How to add hint text in bootstrap input text field and text area - Bootstrap
- How to Subscribe to AWS SNS Topic [SMS/Email/Lambda] via CLI - AWS
- How to create a Git Project in Eclipse (Step-by-step) - Eclipse
- Install Oh My Zsh on Ubuntu Docker complete steps - Ubuntu
- Selenium Maven Dependency for pom.xml - Java