关键词:
# This commands script file creates a new BITS transfer job that downloads all Sharepoint 2013 Prerequisites files for Windows Server 2012
# Author: Muawiyah Shannak (@MuShannak)
# Blog: http://mushannak.blogspot.com/
# Last Update : 9/28/2013
# Source: http://gallery.technet.microsoft.com/Script-to-SharePoint-2013-702e07df
$DestinationFolder = 'F:\Downloads\Prereqs' ##Read-Host -Prompt "Please enter the destination path for Sharepoint 2013 Prerequisites files"
# Note: The Prerequisite Files URLs are subject to change at Microsoft's discretion - check http://technet.microsoft.com/en-us/library/cc262485(v=office.15).aspx and update the links.
$FilesUrlList = (
"http://download.microsoft.com/download/9/1/3/9138773A-505D-43E2-AC08-9A77E1E0490B/1033/x64/sqlncli.msi", # SQL Server 2008 R2 SP1 Native Client
"http://download.microsoft.com/download/8/F/9/8F93DBBD-896B-4760-AC81-646F61363A6D/WcfDataServices.exe", # Microsoft WCF Data Services 5.0
"http://download.microsoft.com/download/9/1/D/91DA8796-BE1D-46AF-8489-663AB7811517/setup_msipc_x64.msi", # Microsoft Information Protection and Control Client (MSIPC)
"http://download.microsoft.com/download/E/0/0/E0060D8F-2354-4871-9596-DC78538799CC/Synchronization.msi", # Microsoft Sync Framework Runtime v1.0 SP1 (x64)
"http://download.microsoft.com/download/0/1/D/01D06854-CA0C-46F1-ADBA-EBF86010DCC6/r2/MicrosoftIdentityExtensions-64.msi", # Windows Identity Extensions
"http://download.microsoft.com/download/D/7/2/D72FD747-69B6-40B7-875B-C2B40A6B2BDD/Windows6.1-KB974405-x64.msu", # Windows Identity Foundation (KB974405)
"http://download.microsoft.com/download/A/6/7/A678AB47-496B-4907-B3D4-0A2D280A13C0/WindowsServerAppFabricSetup_x64.exe", #Windows Server AppFabric
"http://download.microsoft.com/download/7/B/5/7B51D8D1-20FD-4BF0-87C7-4714F5A1C313/AppFabric1.1-RTM-KB2671763-x64-ENU.exe", # CU 1 for AppFabric 1.1 (KB2671763)
"http://download.microsoft.com/download/1/C/A/1CAA41C7-88B9-42D6-9E11-3C655656DAB1/WcfDataServices.exe" #v5.6
)
function CreateDestinationFolder()
Try
## Return true if the Destination Folder exists, otherwise return false
If (!(Test-Path "$DestinationFolder" -pathType container))
##Creates the destination folder if it does not exist
New-Item $DestinationFolder -ItemType Directory
Catch
Write-Host "An error occurred creating destination folder (`'$DestinationFolder`'), Please check the path,and try again."
break
function DownloadSP2013Files()
Import-Module BitsTransfer
Write-Host "BitsTransfer Module is loaded"
Write-Host "Downloading..."
ForEach ($FileUrl in $FilesUrlList)
## Get the file name
$DestinationFileName = $FileUrl.Split('/')[-1]
Try
## Return true if the file exists, otherwise return false
If (!(Test-Path "$DestinationFolder\$DestinationFileName"))
Write-Host "`'$FileUrl`' ..."
Start-BitsTransfer -Source $FileUrl -Destination $DestinationFolder\$DestinationFileName -Priority High -ErrorVariable err
If ($err) Throw ""
Else
Write-Host "File $DestinationFileName already exists, skipping..."
Catch
Write-Warning "An error occurred downloading `'$DestinationFileName`'"
break
CreateDestinationFolder
DownloadSP2013Files
Write-Host "Completed"
powershell此powershell脚本使用字段名称获取所有值是sharepoint列表中的字段(代码片段)
查看详情
powershell此powershell脚本从子站点组等于值的所有子站点中删除组。如果要删除gro,请使用此选项(代码片段)
查看详情
powershell此脚本提供已启用限制的web应用程序中的所有列表。(代码片段)
查看详情
powershell此递归powershell脚本从sharepoint中删除网站及其所有子网站。这消除了无法进行del的问题(代码片段)
查看详情
powershell从tfs提要下载所有nuget包的脚本(代码片段)
查看详情
在 powershell 中运行 nmake
】在powershell中运行nmake【英文标题】:Runningnmakeinpowershell【发布时间】:2017-07-2419:56:07【问题描述】:我正在编写一个powershell脚本,该脚本正在调用.ps1中的一个.bat文件来运行nmake,这对我来说没有意义,所以我希望将所有内容... 查看详情
PowerShell脚本将所有旧文件存档在基于月份的目录中
】PowerShell脚本将所有旧文件存档在基于月份的目录中【英文标题】:PowerShellscripttoarchivealloldfilesinadirectorybasedofmonth【发布时间】:2020-02-0616:16:10【问题描述】:使用PowerShell我需要归档过去7年的所有历史文件,以根据创建日期的... 查看详情
powershell使用powershell导出mssql架构。此脚本将导出表,存储过程,触发器,函数和视图的模式定义(代码片段)
查看详情
我的 PowerShell 脚本仅在从 ISE 运行时才有效
】我的PowerShell脚本仅在从ISE运行时才有效【英文标题】:MyPowerShellscriptonlyworkswhenrunningfromISE【发布时间】:2013-03-2222:51:22【问题描述】:我无法发布所有脚本内容,但基本思想是它下载JSON并使用ConvertFrom-Jsoncmdlet将其转换为对象... 查看详情
powershell此sharepointpowershell脚本会检查网站集和web应用程序中的所有网站,以查找特定的web模板(代码片段)
查看详情
powershell这个powershell脚本从顶级目录获取acl,然后将其与所有子目录和输出的acl进行比较。(代码片段)
查看详情
powershell此脚本在不移动数据的情况下复制列表。它将列表保存为模板,使用模板创建列表,然后删除t(代码片段)
查看详情
PowerShell 错误“在此系统上禁用脚本执行”。
】PowerShell错误“在此系统上禁用脚本执行”。【英文标题】:PowerShellbug“executionofscriptsisdisabledonthissystem.”【发布时间】:2019-07-1313:14:20【问题描述】:我有一个powershell脚本,它运行以停止服务、“停止/终止进程”、删除2个... 查看详情
如何将多个字符串参数传递给 PowerShell 脚本?
】如何将多个字符串参数传递给PowerShell脚本?【英文标题】:HowdoIpassmultiplestringparameterstoaPowerShellscript?【发布时间】:2010-09-0613:39:01【问题描述】:我正在尝试进行一些字符串连接/格式化,但它会将所有参数放入第一个占位符... 查看详情
powershell此powershell脚本创建三个sharepoint列表并添加字段(代码片段)
查看详情
嵌入 Powershell 脚本问题
】嵌入Powershell脚本问题【英文标题】:EmbeddinginthePowershellscriptissue【发布时间】:2015-07-0709:26:11【问题描述】:根据其他用户的建议创建此问题,它是this的后续行动。场景是我目前正在尝试创建一个Powershell脚本,第一次使用的... 查看详情
powershell将appdata从一个sdlwebcontentmanager项目复制到另一个sdlwebcontentmanager项目。我使用此脚本在con之后修复媒体管理器ec(代码片段)
查看详情
powershell将appdata从一个sdlwebcontentmanager项目复制到另一个sdlwebcontentmanager项目。我使用此脚本在con之后修复媒体管理器ec(代码片段)
查看详情