• [PowerShell]如何取得sharepoint 2010版本号


    一个csv文件

    "Released","Name","Version" 
    "November 2009","SP2010 Public Beta 2","14.0.4536.1000"
    "October 2009","SP2010 (Tech Preview #2 - used for Ignite training)","14.0.0.4514"
    "July 2009","SP 2010 (Tech Preview)","14.0.4006.1030"

    一个ps1文件

    $farm = [Microsoft.SharePoint.Administration.SPFarm]::Local

    $buildstr = $farm.BuildVersion.ToString()

    $vertable = Import-Csv versions.csv

    $vertable | where-object {$_.Version -eq $buildstr}

    结果

    Released                                Name                                    Version
    --------                                 ----                                      -------
    November 2009                      SP2010 Public Beta 2              14.0.4536.1000

    如果SPS2010还没有加入Powershell,使用以下命令

    Add-PSSnapin Microsoft.SharePoint.Powershell

  • 相关阅读:
    旅行计划
    两只塔姆沃斯牛
    迷宫
    异或序列
    异或之和
    素数个数
    SAC E#1
    [JSOI2010]Group 部落划分 Group
    [USACO12FEB]附近的牛Nearby Cows
    [HNOI2008]Cards
  • 原文地址:https://www.cnblogs.com/by1455/p/1638406.html
Copyright © 2020-2023  润新知