Build Environment:
Windows 2.0 and Win2008 come with PowerShell. Enter powershell in the command.
Http://www.microsoft.com/download/en/details.aspx? Displaylang = en & id = 20430
Use Windows PowerShell ISEWrite code. The user experience is similar to writing c # code. Enter powershell_ise in the running command.
Third-party development tool: PowerGUI.3.1.0.2058.msi, which provides smart sensing.
Common shortcut keys:
After saving the ps file, you can press F9 to start debugging.
F10 jump debugging
F11 single-step debugging
Get-command * uninstall commands that contain partially matched keywords
Get-help uninstall-spsolution-example
Ctrl + c wrap
Programming Skills
Use the methods in the PowerShell keystore library file:
Note: GetNoByName is a method in GetName. ps1.
Add-PSSnapin Microsoft. SharePoint. PowerShell-EA SilentlyContinue
. ("D: \ Mingle \ PS \ GetName. ps1 ")
GetNoByName "fdsfdsafd"
Execute PS files using Bat files
Note: % ~ Dp0 indicates the current path
PowerShell-command Set-ExecutionPolicy "Bypass"
PowerShell-command "& {% ~ Dp0mainbody. ps1-path % ~ Dp0-configurationFilePath % ~ Dp0 \ DeployemntConfiguration. xml-sectionid AZ_EIP-modulename 'common '}"
Pause
Use write-host' for auxiliary debugging
Write-host "Add Groups operation canceled"
Use Exception in PowerShell
Http://huddledmasses.org/trap-exception-in-powershell/
Use Powershell to integrate the SharePoint command window
Author: MingleLui
Source: http://mingle.cnblogs.com/
Windows 2.0 and Win2008 come with PowerShell. Enter powershell in the command.
Http://www.microsoft.com/download/en/details.aspx? Displaylang = en & id = 20430
Use Windows PowerShell ISEWrite code. The user experience is similar to writing c # code. Enter powershell_ise in the running command.
Third-party development tool: PowerGUI.3.1.0.2058.msi, which provides smart sensing.
Common shortcut keys:
After saving the ps file, you can press F9 to start debugging.
F10 jump debugging
F11 single-step debugging
Get-command * uninstall commands that contain partially matched keywords
Get-help uninstall-spsolution-example
Ctrl + c wrap
Programming Skills
Use the methods in the PowerShell keystore library file:
Note: GetNoByName is a method in GetName. ps1.
Add-PSSnapin Microsoft. SharePoint. PowerShell-EA SilentlyContinue
. ("D: \ Mingle \ PS \ GetName. ps1 ")
GetNoByName "fdsfdsafd"
Execute PS files using Bat files
Note: % ~ Dp0 indicates the current path
PowerShell-command Set-ExecutionPolicy "Bypass"
PowerShell-command "& {% ~ Dp0mainbody. ps1-path % ~ Dp0-configurationFilePath % ~ Dp0 \ DeployemntConfiguration. xml-sectionid AZ_EIP-modulename 'common '}"
Pause
Use write-host' for auxiliary debugging
Write-host "Add Groups operation canceled"
Use Exception in PowerShell
Http://huddledmasses.org/trap-exception-in-powershell/
Use Powershell to integrate the SharePoint command window
Author: MingleLui
Source: http://mingle.cnblogs.com/