Questions tagged [cmdlets]

A cmdlet is a lightweight command that is used in the Windows PowerShell environment.

Filter by
Sorted by
Tagged with
2
votes
0answers
41 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 '...
1
vote
2answers
366 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
1answer
451 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, ...
5
votes
1answer
140 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?
0
votes
1answer
550 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.
1
vote
0answers
379 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:...
2
votes
1answer
624 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 ...
0
votes
3answers
4k 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. ...
3
votes
4answers
24k 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
1answer
1k 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 ...
0
votes
1answer
474 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 ...
7
votes
2answers
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 ...
0
votes
1answer
156 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 ...
1
vote
1answer
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 ...
2
votes
1answer
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. ...
0
votes
2answers
1k 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 ...
2
votes
2answers
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> ...
0
votes
2answers
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>...
4
votes
2answers
165 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"
1
vote
3answers
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 ...
6
votes
5answers
14k 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 ...
2
votes
1answer
436 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 = ...
8
votes
2answers
3k 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 ...