sharepoint 2010/2013 ise powershell

To install ISE

Import-Module ServerManager;Add-WindowsFeature PowerShell-ISE

以上命令已通过笔者测试有效.

 

2011-10-27 更新

运行完毕上面的命令后, 可以到如下的路径中寻找powershell_ise.exe来启动PowerShell ISE.

C:\Windows\System32\WindowsPowerShell\v1.0

 

或者在PowerShell命令行中直接运行powershell_ise.exe

 

 

In SharePoint 2010 we now have the ability to administrate our farms using PowerShell which is significantly more powerful than STSADM (out of box anyways). After working with PowerShell and figuring out the basics, you'll probably want to write a few scripts of your own. If you try to use the PowerShell ISE to author your scripts, you notice that none of your SharePoint commandlets are available to you by default. This is because the ISE has not loaded up the SharePoint PowerShell Snap-ins. To get the snap in loaded you'll need to add the snap-in in your PowerShell ISE profile. Here's a quick script to get this done from within the ISE, just type this in the ISE command window:

if (!(test-path $profile )) 

{ 

    new-item -type file -path $profile -force 

} 

 



$cmd = 'if((Get-PSSnapin | Where-Object {$_.Name -eq "Microsoft.SharePoint.PowerShell"}) -eq $null) 

{ 

    Add-PSSnapIn "Microsoft.SharePoint.Powershell" 

}'



out-file -FilePath $profile -InputObject $cmd -Append
 

Run the commands then close and open the ISE. You now should have the SharePoint snapin loaded and you should get the friendly auto complete functionality you're used to in the SharePoint PowerShell command window.

 

 

 

修改SharePoint2013顶部导航

$wa = Get-SPWebApplication
 
# This can be an empty string
 
$wa.SuiteBarBrandingElementHtml = ” ”
 
#Save your change
 
$wa.Update()

 

你可能感兴趣的:(SharePoint)