Questions tagged [cmdlets]
A cmdlet is a lightweight command that is used in the Windows PowerShell environment.
24
questions
8
votes
2
answers
4k
views
When Would Install-SPSolution -Local be used
The use case for Install-SPSolution -Local is not clear to me.
This TechNet article Deploy solution packages (SharePoint Server 2010) suggests that I can use -Local to install solutions manually 1 ...
8
votes
2
answers
2k
views
Script to automatically import documents from a network share on a regular schedule
I am new to SharePoint development.
I am trying automate the task of:
Uploading documents from a network share to a SharePoint document library.
The related metadata for each of the files also need ...
6
votes
5
answers
15k
views
SPSite.allwebs returns error
First of all sorry if this is an obvious question, I searched a lot but can't find the solution.
When I open an spsite in powershell like this:
$spsite = Get-SPSite "https://adress"
And then I ...
6
votes
1
answer
155
views
SharePoint Online Management Shell
Is there any way to check site collection document libraries Metadata i.e. (last modified date, owner name) using SharePoint Online Shell?
4
votes
2
answers
171
views
What do I need to do in order to execute cmdlets (sharepoint 2010)
Need to execute an out of the box cmdlet for SharePoint 2010... but cannot for the life of me figure out how to execute them.
What am I missing?
I am trying to execute "Get-SPServiceApplication"
3
votes
4
answers
27k
views
how to allow Write-Host command to write into a file (notepad) rather than in the screen
I run the following script in SP PowerShell
Add-PSSnapin Microsoft.SharePoint.Powershell -ea 0;
$web = get-spweb 'http://tvstg01/kb/customerservice/'
$list = $web.lists['Customer Service'];
foreach(...
2
votes
1
answer
2k
views
Exception Error When Running Basic PowerShell Script in SharePoint 2010
I have been doing some testing in our labs for some new features we are working on. I purposely created some orphaned sites using a scenario I found in a blog and I ran into a strange side effect. ...
2
votes
1
answer
2k
views
SnapIn won't load, the Cmdlets now target the wrong Powershell Version, how'd that happen?
I've inherited a Server-2008 SharePoint-2010 Dev environment, the SharePoint Snapin fails to load; warning ...
Add-PSSnapin : Incorrect Windows PowerShell version 3.0. Windows PowerShell
version 2.0 ...
2
votes
2
answers
2k
views
Activate Feature in Powershell and specify custom properties
I want to activate a feature with custom properties. It is easy to do in onet.xml by providing Properties:
<Feature ID=“78277796-98D9-4276-B7D2-E3374AAC43D8“>
<Properties>
...
2
votes
0
answers
702
views
People Modern Webpart not refreshing profile pictures
We have updated hundreds of our users Profile pictures with the cmdlet
Set-UserPhoto
These images propagate pictures across Delve, Office, Exchange and SharePoint but it will not force update the '...
2
votes
1
answer
742
views
Set-SPOWeb -RequestAccessEmail
I found in this post that it is possible to Set-SPOWeb properties, in particular RequestEmailAddress. Obviously the guy did not dream it up and the number of upvotes suggests that it works for other ...
2
votes
1
answer
504
views
How to access the web-application hosted on the another Farm using SharePoint 2010 Management Shell?
I am trying to access the web-application that is hosted on the another SharePoint 2010 Farm using SharePoint 2010 Management Shell cmdlets but it is failing with the below error message
$spsite = ...
1
vote
2
answers
883
views
SharePoint OnLine Using Cmdlet New-SPWOPIBinding
I am a young SharePoint OnLine user.
I want Excel documents from all my sites to open directly with Excel and not Excel-OnLine.
As I have a lot of sites and it would be long to make the sites one by ...
1
vote
1
answer
1k
views
How to use Power Shell cmdlets with batch file?
I have bit interesting requirements. My client want to develop the Sharepoint 2010 administration UI from Java application. So I suggest him to user Sharepoint web services. As we all know its good to ...
1
vote
3
answers
3k
views
Automated Sharepoint Task Creation with Powershell
This is a cross-post from stackoverflow, upon the suggestion of a user there.
My organization is experimenting with new processes to coordinate developers as they integrate their code into our main ...
1
vote
1
answer
769
views
Sharepoint commands not available in my computer's Powershell
I am working on a project at my job with Sharepoint 2013 On-premises, and recently I discovered that there are multiple benefits by using Powershell to perform different tasks with the site.
However, ...
1
vote
0
answers
564
views
Can the SPFileCollection.Add method check if I file has changed?
I'm using the sharepoint powershell cmdlets to upload files to a document library like so:
# Set the variables
$WebURL = “http://portal.contoso.com/sites/stuff”
$DocLibName = “Docs”
$FilePath = “C:...
0
votes
3
answers
9k
views
Multiple AND OR inside a powershell if statment
I am trying to write a PowerShell script for my SharePoint 2013. The idea is that I what to select all the links that are referencing /documents/ folder, and that ends with either .doc .docx or .pdf. ...
0
votes
1
answer
872
views
Difference between Get-SPSite and Get-SPsiteAdministration
What is the difference between Get-SPSite and Get-SPSiteAdministration cmdlets?
I know Get-SPSite has more properties, but I want to know the core difference. Appreciate if u could explain in detail.
0
votes
1
answer
176
views
Different results from Command Line and Script
If I run Get-SPWebApplication -IncludeCentralAdministration | Get-SPSite | Get-SPWeb I get back a list of all web sites including Central Administration. If I put this line in a script and run this ...
0
votes
2
answers
1k
views
Errors when attempting to install a sharepoint 2010 feature
I'm attempting to install and activate a feature containing a Timer Job. When I execute the install-spfeature cmdlet I get the following error. What is the source of my error?
PS C:\Users\crmadmin>...
0
votes
1
answer
13
views
Get-Team cmdlet runs but returns no data
I attempting to create a PowerShell script which will return a complete list of Teams in an M365 Tenancy as a csv file. My script appears to run successfully but it does not return the expected data.
...
0
votes
1
answer
555
views
Copy-SPSite for /PWA doesn't work on SharePoint 2013
Hello I'm trying to make a script to move an ProjectServer site from one farm to another.
To to this, first I import the WSS_Content database then try to rename the /PWA site with Copy-SPSite ...
0
votes
2
answers
2k
views
Powershell deployment with nant - problem with script arguments
I have a powershell script updating my solution:
Add-PSSnapin Microsoft.SharePoint.PowerShell
write-host $args[0]
Update-SPSolution -Identity PkbInfo.SP.wsp -literalpath $args[0] -GACDeployment
...