Archive

Posts Tagged ‘Power Shell’

SharePoint 2013 Configuration Wizard Missing Components Language Pack Installation

September 8, 2014 Leave a comment

Olá! J

Cenário:

 

Após aplicar o SP1 no SharePoint 2013 e também SP1 dos Language Pack instalados precisamos rodar o Configuration Wizard (PSCONFIG) para que o SharePoint consolide as atualizações realizadas. Mas, como nem tudo é como nós queremos nessa vida, tive alguns problemas para conseguir fazer com que o Configuration Wizard rodasse sem problemas.

 

ERRO:

 

Ao tentar rodar o Configuration Wizard era apresentado uma mensagem de erro informando que estavam faltando arquivos no SharePoint, embora eu já tivesse aplicado todos os pacotes de Language Pack e seus respectivos Service Pack.

 

“Some farm products and patches were not detected… Missing on <ServerName>”


SOLUÇÃO:

 

Procurando por problema similares na web, encontrei que isso poderia ocorrer por razão do serviço de timer parado, mas no meu caso estava rodando. De toda forma, reiniciei o serviço e tentei rodar novamente o Configuration Wizard. Sem sucesso.

 

O que resolveu foi rodar o seguinte cmdlet no powershell do SharePoint (SharePoint 2013 Management Shell) no servidor que ele apontava com “missing” (faltando) componente:

 

Get-SPProduct

 

Pronto! Ao término da execução deste cmdlet, tente rodar novamente o Configuration Wizard. Agora o SharePoint sabe que os componentes estão instalados e não deve reclamar mais a falta destes.

 

Abraço!

Conhecendo os Nomes Dos ApplicationPools de Serviço do SharePoint 2010 no IIS Manager

June 12, 2012 2 comments

Olá! Smile

Já faz um tempinho que não escrevo nada no blog… sorry! SharePointeando por aí, mas encontrei um tempinho pra aparecer por aqui hoje. (Sim, eu sei, ÀS 1h00 AM!! rs)

Cenário:

Quando criamos os Service Applications (figura 1) na Central Administration do SharePoint, o SharePoint cria Application Pools (ou utiliza já existentes) no IIS, e, para nossa surpresa (e não para nossa Alegria!), ele coloca GUIDs (figura 2) nos nomes!

Figura1:

image

Figura 2:

image

Se eu tenho poucas (como é o caso da minha máquina de desenvolvimento) na tentativa e erro, chego no AppPool que preciso, sem demorar muito. Mas, e se tenho diversos serviços na FARM e de forma isolada (1 pool para cada serviço)? Loucura Total!

Sabendo qual dos Application Pools queremos “trabalhar”, facilita demais operações de manutenção e/ou troubleshooting (esse último caso, o mais comum!). Então vamos lá!

SOLUÇÃO:

Pra quem conhece, sabe que o PowerShell opera milagres na vida de um Administrador Microsoft.

Eu não sou tão heavy user de cmdlets PowerShell, mas os mais simples sempre estão na ponta dos dedos!

Eis que temos mais um bem simples:

Get-SPServiceApplicationPool | select Id, Name

Com esta linha de comando, para ser executado no SharePoint 2010 Management Shell (ou no PowerShell com Snap-In para SharePoint), listamos todos os Application Pools de Serviços da FARM, selecionando o Id (Guid) e o nome que demos ao Application Pool quando criamos o serviço na Central Administration.

image

É isso aí, até mais! J

Abraço!

Como listar todas as features instaladas na Farm do SharePoint

Olá! Smile

Overview:

O SharePoint, como muitos já conhecem, possui um conceito muito interessante de features (recursos), onde podemos disponibilizar, ou não, certas funcionalidades a um site. E, dependendo do escopo, falamos de Farm, Web Application, Site Collection (Site) e Site (Web).

Cenário:

Certo. E o que tem tudo isso? Se você ainda não passou por isso, CERTAMENTE vai passar.

Muitas vezes, em diversas ocasiões, precisamos responder questões como:

· Minha feature está instalada?

· Uma feature da Microsoft está instalada?

· Uma feature de terceiros (codeplex, por exemplo) está instalada?

· Qual o ID/Nome de uma feature específica?

SOLUÇÃO:

O caminho pode ser árduo para responder as questões acima. Mas, se você souber este simples comando abaixo, sua vida será demasiadamente mais fácil!

No SharePoint 2010 Management Shell (PowerShell com snap-in do SharePoint):

clip_image002

Digite:

Get-SPFeature | Sort –Property Scope, DisplayName

clip_image004

Ou

Get-SPFeature | Sort –Property Scope, DisplayName > c:\TodasFeaturesInstaladas.txt

Esta última opção cria um arquivo TXT para, talvez, melhorar a consulta.

clip_image006

Abraço!

 

Posts relacionados:

https://thiagottss.wordpress.com/2011/03/25/sharepoint-2010-features-e-seus-guids/

https://thiagottss.wordpress.com/2011/01/13/gerenciando-wsps-com-powershell-no-sharepoint-2010/

Não é possível renderizar o formulário. O Serviço de Controle de Sessão do Microsoft SharePoint Server pode estar configurado incorretamente.

January 14, 2011 Leave a comment

Olá! Smile

Overview:

Desta vez, tentei criar um Fluxo de Trabalho nativo do SharePoint, aquele fluxo de Aprovação padrão mesmo.

Ao preencher o primeiro formulário e avançar, deveríamos ir para a tela de configuração da aprovação, puxando um formulário InfoPath. Ao invés disso, nos deparamos com o erro abaixo.

ERRO:

Não é possível renderizar o formulário. O Serviço de Controle de Sessão do Microsoft SharePoint Server pode estar configurado incorretamente.

Esse é o Erro que o usuário viu no browser, mas indo nos LOGS do SharePoint (%CommonProgramFiles%\Microsoft Shared\Web Server Extensions\14\LOGS), temos o seguinte:

Microsoft SharePoint State Service is not configured correctly and cannot respond to requests. InfoPath Forms Services relies on Microsoft SharePoint State Service to function correctly. Check the SharePoint Maintenance Engine rules in SharePoint Central Administration for issues with Microsoft SharePoint State Service configuration.

SOLUÇÃO:

Precisamos rodar alguns comandos PowerShell para:

· Criar um State Service;

· Criar um State Service database e associar o State Service criado no passo anterior;

· Criar State Service application proxy no group do Default Proxy da Farm.

 

Não tem segredo, é só executar as três linhas no SharePoint 2010 Management Shell.

 

$serviceApp = New-SPStateServiceApplication -Name “State Service”

New-SPStateServiceDatabase -Name “StateServiceDatabase” -ServiceApplication $serviceApp

New-SPStateServiceApplicationProxy -Name “State Service” -ServiceApplication $serviceApp –DefaultProxyGroup

 

Abraço!

Gerenciando WSPs com PowerShell no SharePoint 2010

January 13, 2011 1 comment

Olá! Smile

Overview:

Como muitos sabem, a ferramenta STSADM (muito utilizada no MOSS 2007 para gerenciar WSPs e todas outras muitas funcionalidades do SharePoint) no SharePoint 2010 é mantida apenas para fins de compatibilidade, tornando-se obsoleta.

Informações sobre o que eu disse acima e muitas outras coisas que mudaram, em: http://technet.microsoft.com/en-us/library/ff607713.aspx – Changes from Windows SharePoint Services 3.0 to SharePoint Foundation 2010.

Trecho do artigo do TechNet sobre o STSADM:

Deprecated features

The following feature is shipped with SharePoint Foundation 2010 but will be removed from subsequent versions.

Stsadm command-line tool

Description: The Stsadm command-line tool has been deprecated.

Reason for change: The Stsadm command-line tool will be superseded by Windows PowerShell 2.0.

Migration path: The Stsadm command-line tool is included to support compatibility with previous product versions. You should use Windows PowerShell 2.0 when performing command-line administrative tasks.

Então, vamos nos atualizar para os comandos mais utilizados. Neste post, vou falar sobre as tarefas de manutenção de Solutions (WSP’s).

SOLUÇÃO:

Este post certamente encadeará outros sobre o mesmo assunto e, na medida do possível, irei “linkar” eles.

Vamos ao que interessa:

Tip: Usem o SharePoint 2010 Management Shell, fica mais fácil do que ficar adicionando Snap-in toda hora.

image

image

STSADM

PowerShell

Adicionando uma solution

Adicionando uma solution

stsadm –o addsolution –filename “C:\ SolutionPackage.wsp”

Add-SPSolution –LiteralPath “C:\SolutionPackage.wsp”

Implantando uma solution (deploy)

Implantando uma solution (deploy)

stsadm –o deploysolution –name SolutionPackage.wsp –url http://webapplication –allowgacdeployment –immediate

Install-SPSolution –Identity SolutionPackage.wsp –WebApplication http://webapplication –GACDeployment

Atualizando uma solution existente (upgrade)

Atualizando uma solution existente (upgrade)

stsadm –o upgradesolution –name SolutionPackage.wsp –filename “C:\SolutionPackage.wsp” –immediate

Update-SPSolution –Identity Solution.wsp –LiteralPath “C:\SolutionPackage.wsp” –GacDeployment

Retract da solution

Retract da solution

stsadm –o retractsolution –name SolutionPackage.wsp –url http://webapplication –immediate

Uninstall-SPSolution –Identity SolutionPackage.wsp –WebApplication http://webapplication

Apagando uma solution

Apagando uma solution

stsadm –o deletesolution –name SolutionPackage.wsp

Remove-SPSolution –Identity SolutionPackage.wsp

Uma lista completa com um de-para de comandos aqui: http://technet.microsoft.com/en-us/library/ff621084.aspx – Stsadm to Windows PowerShell mapping (SharePoint Server 2010).

Stsadm operation

Windows PowerShell cmdlet

Activatefeature

Enable-SPFeature

Activateformtemplate

Enable-SPInfoPathFormTemplate

Addalternatedomain

New-SPAlternateUrl

Addcontentdb

Mount-SPContentDatabase

New-SPContentDatabase

Adddataconnectionfile

Install-SPDataConnectionFile

Add-ecsfiletrustedlocation

New-SPExcelFileLocation

Add-ecssafedataprovider

New-SPExcelDataProvider

Add-ecstrusteddataconnectionlibrary

New-SPExcelDataConnectionLibrary

Add-ecsuserdefinedfunction

New-SPExcelUserDefinedFunction

Addexemptuseragent

Add-SPInfoPathUserAgent

Addpath

New-SPManagedPath

Addpermissionpolicy

None

Addsolution

Add-SPSolution

Addtemplate

Install-SPWebTemplate

Adduser

New-SPUser

Addwppack

Install-SPWebPartPack

Addzoneurl

New-SPAlternateUrl

Allowuserformwebserviceproxy

Set-SPInfoPathWebServiceProxy

Use the AllowForUserForms and Identity parameters.

Allowwebserviceproxy

Set-SPInfoPathWebServiceProxy

Use the AllowWebServiceProxy and Identity parameters.

Authentication

Set-SPWebApplication

Use the AuthenticationMethod or AuthenticationProvider parameters.

Backup

Backup-SPConfigurationDatabase

Backup-SPFarm

Backup-SPSite

Backuphistory

Get-SPBackupHistory

Binddrservice

None

Blockedfilelist

None

Canceldeployment

None

Changepermissionpolicy

None

Copyappbincontent

None

Createadminvs

New-SPCentralAdministration

Creategroup

None

Createsite

New-SPSite

Createsiteinnewdb

New-SPSite Use the ContentDatabase parameter.

New-SPContentDatabase

Createweb

New-SPWeb

Databaserepair

None

Deactivatefeature

Disable-SPFeature

Deactivateformtemplate

Disable-SPInfoPathFormTemplate

Deleteadminvs

None

Deletealternatedomain

Remove-SPAlternateUrl

Deleteconfigdb

Remove-SPConfigurationDatabase

Deletecontentdb

Dismount-SPContentDatabase

Deletegroup

None

Deletepath

Remove-SPManagedPath

Deletepermissionpolicy

None

Deletesite

Remove-SPSite

Deletesolution

Remove-SPSolution

Deletetemplate

Uninstall-SPWebTemplate

Deleteuser

Remove-SPUser

Deleteweb

Remove-SPWeb

Deletewppack

Uninstall-SPWebPartPack

Deletezoneurl

Remove-SPAlternateUrl

Deploysolution

Install-SPSolution

Deploywppack

Install-SPWebPartPack

Disablessc

None

Displaysolution

Get-SPSolution

Editcontentdeploymentpath

Set-SPContentDeploymentPath

Email

None

Enablessc

None

Enumalternatedomains

Get-SPAlternateURL

Enumcontentdbs

Get-SPContentDatabase

Enumdataconnectionfiledependants

Get-SPDataConnectionFileDependent

Enumdataconnectionfiles

Get-SPDataConnectionFile

Enumdeployments

None

Enumexemptuseragents

Get-SPInfoPathUserAgent

Enumformtemplates

Get-SPInfoPathFormTemplate

Enumgroups

None

Enumroles

None

Enumservices

Get-SPServiceInstance

Enumsites

Get-SPSiteAdministration (To run this cmdlet, you must be a member of the Farm Administrators group.)

Get-SPSite (To run this cmdlet, you must be a local administrator on the computer where SharePoint 2010 Products is installed.)

Enumsolutions

Get-SPSolution

Enumsubwebs

Get-SPWeb

Enumtemplates

Get-SPWebTemplate

Enumusers

Get-SPUser

Enumwppacks

Get-SPWebPartPack

Enumzoneurls

Get-SPAlternateURL

Execadmsvcjobs

Start-SPAdminJob

Export

Export-SPWeb

Extendvs

New-SPWebApplication

Extendvsinwebfarm

New-SPWebApplicationExtension

Forcedeletelist

None

Getadminport

Get-SPWebApplication

Use the following syntax:

· Get-SPWebApplication -IncludeCentralAdministration | ? {$_.IsAdministrationWebApplication -eq $true}

Getdataconnectionfileproperty property

Get-SPDataConnectionFile

Use the following syntax:

· Get-SPDataConnectionFile | where {$_.Name -eq “dataConFileName”} | format-list

Getformtemplateproperty property

Get-SPInfoPathFormTemplate

Use the following syntax:

· Get-SPInfoPathFormTemplate | where {$_.DisplayName -eq “formTemplateName”} | format-list

Getosearchsetting

None

Getproperty

Get-SPFarmConfig

Get-SPTimerJob

Disable-SPTimerJob

Enable-SPTimerJob

Set-SPTimerJob

Start-SPTimerJob

Getsitelock

Get-SPSiteAdministration

Getsiteuseraccountdirectorypath

None

Geturlzone

Get-SPAlternateURL

Import

Import-SPWeb

Installfeature

Install-SPFeature

Listlogginglevels

Get-SPLogLevel

Listqueryprocessoroptions

None

Listregisteredsecuritytrimmers

Get-SPEnterpriseSearchSecurityTrimmer

Localupgradestatus

None

Managepermissionpolicylevel

None

Mergecontentdbs

Move-SPSite

Migrateuser

Move-SPUser

Osearch

For the Osearch parameters farmcontactemail, farmperformancelevel, farmserviceaccount, and farmservicepassword, use the Get-SPEnterpriseSearchService and Set-SPEnterpriseSearchService cmdlets.

For the Osearch parameters start and stop, use the Start-SPEnterpriseSearchServiceInstance and Stop-SPEnterpriseSearchServiceInstance cmdlets, respectively.

For the Osearch parameter defaultindexlocation, use the Get-SPEnterpriseSearchServiceInstance and Set-SPEnterpriseSearchServiceInstance cmdlets.

Osearchdiacriticsensitive

Use the Get-SPEnterpriseSearchServiceApplication cmdlet to retrieve the specific Search service application, and then use DiacriticSensitive parameter from the Set-SPEnterpriseSearchServiceApplication cmdlet.

Provisionservice

Start-SPServiceInstance

Quiescefarm

None

Quiescefarmstatus

None

Quiesceformtemplate

Stop-SPInfoPathFormTemplate

Reconvertallformtemplates

Update-SPInfoPathFormTemplate

Refreshdms

None

Refreshsitedms

None

Registersecuritytrimmer

New-SPEnterpriseSearchSecurityTrimmer

Registerwsswriter

None

Removedataconnectionfile

Uninstall-SPDataConnectionFile

Remove-ecsfiletrustedlocation

Remove-SPExcelFileLocation

Remove-ecssafedataprovider

Remove-SPExcelDataProvider

Remove-ecstrusteddataconnectionlibrary

Remove-SPExcelDataConnectionLibrary

Remove-ecsuserdefinedfunction

Remove-SPExcelFileLocation

Removedrservice

None

Removeexemptuseragent

Remove-SPInfoPathUserAgent

Removeformtemplate

Uninstall-SPInfoPathFormTemplate

Removesolutiondeploymentlock

None

Renameserver

Rename-SPServer

Renamesite

Set-SPSite

Use the Url parameter.

Renameweb

Set-SPWeb

Use the RelativeUrl parameter.

Restore

Restore-SPFarm

Restore-SPSite

Retractsolution

Uninstall-SPSolution

Retractwppack

None

Runcontentdeploymentjob

Start-SPContentDeploymentJob

Scanforfeatures

Install-SPFeature

Use the Scanforfeatures parameter.

Setadminport

Set-SPCentralAdministration

Setapppassword

None

Setconfigdb

Connect-SPConfigurationDatabase

Setcontentdeploymentjobschedule

Set-SPContentDeploymentJob

Setdataconnectionfileproperty

Set-SPDataConnectionFile

Set-ecsexternaldata

Set-SPExcelFileLocation

Set-ecsloadbalancing

Set-SPExcelServiceApplication

Use the LoadBalancingScheme parameter.

Set-ecsmemoryutilization

Set-SPExcelServiceApplication

Use the MemoryCacheThreshold and PrivateBytesMax parameters.

Set-ecssecurity

Set-SPExcelServiceApplication

Use the CrossDomainAccessAllowed, EncryptedUserConnectionRequired, and FileAccessMethod parameters.

Set-ecssessionmanagement

Set-SPExcelServiceApplication

Use the SessionsPerUserMax and SiteCollectionAnonymousSessionsMax parameters.

Set-ecsworkbookcache

Set-SPExcelServiceApplication

Use the Workbookcache and WorkbookCacheSizeMax parameters.

Setformtemplateproperty

Set-SPInfoPathFormTemplate

Setlogginglevel

Set-SPLogLevel

Setosearchsetting

None

Setproperty

Set-SPFarmConfig

Get-SPTimerJob

Disable-SPTimerJob

Enable-SPTimerJob

Set-SPTimerJob

Start-SPTimerJob

Setqueryprocessoroptions

None

Setsitelock

Set-SPSiteAdministration

Use the LockState parameter.

Setsiteuseraccountdirectorypath

Get-SPSiteSubscription

New-SPSiteSubscription

Remove-SPSiteSubscription

Setworkflowconfig

Set-SPWorkflowConfig

Siteowner

Set-SPSiteAdministration

Syncsolution

Install-SPSolution

Use the Synchronize parameter.

Unextendvs

Remove-SPWebApplication

Uninstallfeature

Uninstall-SPFeature

Unquiescefarm

None

Unquiesceformtemplate

Start-SPInfoPathFormTemplate

Unregistersecuritytrimmer

Remove-SPEnterpriseSearchSecurityTrimmer

Unregisterwsswriter

None

Updateaccountpassword

Set-SPManagedAccount

Updatealerttemplates

None

Updatefarmcredentials

None

Upgrade

None

Upgradeformtemplate

Install-SPInfoPathFormTemplate

Upgradesolution

Update-SPSolution

Upgradetargetwebapplication

None

Uploadformtemplate

Install-SPInfoPathFormTemplate

Userrole

Get-SPUser

Move-SPUser

New-SPUser

Remove-SPUser

Set-SPUser

Verifyformtemplate

Test-SPInfoPathFormTemplate

Abraço!