zoukankan      html  css  js  c++  java
  • sharepoint 版本信息查看

    #检查版本:
    # PowerShell script to display SharePoint products from the registry.

    Param(
    # decide on whether all the sub-components belonging to the product should be shown as well
    [switch]$ShowComponents
    )

    # location in registry to get info about installed software

    $RegLoc = Get-ChildItem HKLM:SoftwareMicrosoftWindowsCurrentVersionUninstall

    # Get SharePoint Products and language packs

    write-host "Products and Language Packs"
    write-host "-------------------------------------------"

    $Programs = $RegLoc |
    where-object { $_.PsPath -like "*Office*" } |
    foreach {Get-ItemProperty $_.PsPath}
    $Components = $RegLoc |
    where-object { $_.PsPath -like "*1000-0000000FF1CE}" } |
    foreach {Get-ItemProperty $_.PsPath}

    # output either just the info about Products and Language Packs
    # or also for sub components

    if ($ShowComponents.IsPresent)
    {
    $Programs | foreach {
    $_ | fl DisplayName, DisplayVersion;

    $productCodes = $_.ProductCodes;
    $Comp = @() + ($Components |
    where-object { $_.PSChildName -in $productCodes } |
    foreach {Get-ItemProperty $_.PsPath});
    $Comp | Sort-Object DisplayName | ft DisplayName, DisplayVersion -Autosize
    }
    }
    else
    {
    $Programs | fl DisplayName, DisplayVersion
    }

  • 相关阅读:
    第12组(78) 团队展示(组长)
    第一次结对编程作业
    Alpha冲刺总结
    第02组Alpha冲刺(6/6)
    第02组Alpha冲刺(5/6)
    第02组Alpha冲刺(4/6)
    第02组Alpha冲刺(3/6)
    第02组Alpha冲刺(2/6)
    第02组Alpha冲刺(1/6)
    第02组(51)需求分析报告
  • 原文地址:https://www.cnblogs.com/hqbird/p/4452753.html
Copyright © 2011-2022 走看看