CentOS 7 上面安装PowerShell

看了文章 爱上PowerShell , 就想在CentOS 7上面试试PowerShell , 本文记录了在CentOS 7.2上安装Powershell 的过程。

首先我们要从github上下载最新的PowerShell 的rpm 包powershell-6.0.0_alpha.14-1.el7.centos.x86_64.rpm,安装方法的文档 https://github.com/PowerShell/PowerShell/blob/master/docs/installation/linux.md#centos-7 ,下面贴出具体的安装输出:

[[email protected] ~]$ sudo yum install powershell-6.0.0_alpha.14-1.el7.centos.x86_64.rpm
[sudo] password for geffzhang:
Loaded plugins: fastestmirror, langpacks
Examining powershell-6.0.0_alpha.14-1.el7.centos.x86_64.rpm: powershell-6.0.0_alpha.14-1.el7.centos.x86_64
Marking powershell-6.0.0_alpha.14-1.el7.centos.x86_64.rpm to be installed
Resolving Dependencies
--> Running transaction check
---> Package powershell.x86_64 0:6.0.0_alpha.14-1.el7.centos will be installed
--> Processing Dependency: uuid for package: powershell-6.0.0_alpha.14-1.el7.centos.x86_64
base                                                     | 3.6 kB     00:00
extras                                                   | 3.4 kB     00:00
openlogic                                                | 1.3 kB     00:00
updates                                                  | 3.4 kB     00:00
Loading mirror speeds from cached hostfile
--> Running transaction check
---> Package uuid.x86_64 0:1.6.2-26.el7 will be installed
--> Finished Dependency Resolution

Dependencies Resolved

================================================================================
Package
      Arch   Version       Repository                                      Size
================================================================================
Installing:
powershell
      x86_64 6.0.0_alpha.14-1.el7.centos
                           /powershell-6.0.0_alpha.14-1.el7.centos.x86_64 124 M
Installing for dependencies:
uuid x86_64 1.6.2-26.el7  base                                            55 k

Transaction Summary
================================================================================
Install  1 Package (+1 Dependent package)

Total size: 124 M
Total download size: 55 k
Installed size: 124 M
Is this ok [y/d/N]: y
Downloading packages:
uuid-1.6.2-26.el7.x86_64.rpm                               |  55 kB   00:00
Running transaction check
Running transaction test
Transaction test succeeded
Running transaction
  Installing : uuid-1.6.2-26.el7.x86_64                                     1/2
  Installing : powershell-6.0.0_alpha.14-1.el7.centos.x86_64                2/2
  Verifying  : uuid-1.6.2-26.el7.x86_64                                     1/2
  Verifying  : powershell-6.0.0_alpha.14-1.el7.centos.x86_64                2/2

Installed:
  powershell.x86_64 0:6.0.0_alpha.14-1.el7.centos

Dependency Installed:
  uuid.x86_64 0:1.6.2-26.el7

安装结束后在Linux控制台输入PowerShell,即可启动PowerShell:

[[email protected] ~]$ powershell
PowerShell
Copyright (C) 2016 Microsoft Corporation. All rights reserved.

PS /home/geffzhang>
然后我们来看一下版本信息:

PS /home/geffzhang> $PSVersionTable
PowerShell
Name                           Value
----                           -----
PSVersion                      6.0.0-alpha
PSEdition                      Core
PSCompatibleVersions           {1.0, 2.0, 3.0, 4.0...}
BuildVersion                   3.0.0.0
GitCommitId                    v6.0.0-alpha.14
CLRVersion
WSManStackVersion              3.0
PSRemotingProtocolVersion      2.3
SerializationVersion           1.1.0.1

PS /home/geffzhang> Get-Variable

Name                           Value
----                           -----
?                              True
^                              $PSVersionTable
$                              $PSVersionTable
args                           {}
ConfirmPreference              High
ConsoleFileName
DebugPreference                SilentlyContinue
Error                          {}
ErrorActionPreference          Continue
ErrorView                      NormalView
ExecutionContext               System.Management.Automation.EngineIntrinsics
false                          False
FormatEnumerationLimit         4
HOME                           /home/geffzhang
Host                           System.Management.Automation.Internal.Host.InternalHost
InformationPreference          SilentlyContinue
input                          System.Collections.ArrayList+ArrayListEnumeratorSimple
IsCoreCLR                      True
IsLinux                        True
IsOSX                          False
IsWindows                      False
MaximumHistoryCount            4096
MyInvocation                   System.Management.Automation.InvocationInfo
NestedPromptLevel              0
null
OutputEncoding                 System.Text.ASCIIEncoding
PID                            1208
PROFILE                        /home/geffzhang/.config/powershell/Microsoft.PowerShell_profile.ps1
ProgressPreference             Continue
PSBoundParameters              {}
PSCommandPath
PSCulture                      en-US
PSDefaultParameterValues       {}
PSEdition                      Core
PSEmailServer
PSHOME                         /opt/microsoft/powershell/6.0.0-alpha.14
PSScriptRoot
PSSessionApplicationName       wsman
PSSessionConfigurationName     http://schemas.microsoft.com/powershell/Microsoft.PowerShell
PSSessionOption                System.Management.Automation.Remoting.PSSessionOption
PSUICulture                    en-US
PSVersionTable                 {PSVersion, PSEdition, PSCompatibleVersions, BuildVersion...}
PWD                            /home/geffzhang
ShellId                        Microsoft.PowerShell
StackTrace
true                           True
VerbosePreference              SilentlyContinue
WarningPreference              Continue
WhatIfPreference               False

PS /home/geffzhang>
我们看到了powershell 是用.NET Core来跑的。 我们下面再来看下PowerShell 在Linux上面都支持那些命令,运行下面的命令生成一张HTML表格:

PS /home/geffzhang> Get-command |Sort-Object NounName | select Name,CommandType,Source | ConvertTo-Html

Linux上的PowerShell命令一览表

Name CommandType Source
Add-NodeKeys Function PSDesiredStateConfiguration
Install-PackageProvider Cmdlet PackageManagement
Install-Package Cmdlet PackageManagement
Import-PSSession Cmdlet Microsoft.PowerShell.Utility
Import-PackageProvider Cmdlet PackageManagement
Import-Module Cmdlet Microsoft.PowerShell.Core
Import-LocalizedData Cmdlet Microsoft.PowerShell.Utility
Import-Csv Cmdlet Microsoft.PowerShell.Utility
Import-Clixml Cmdlet Microsoft.PowerShell.Utility
Import-Alias Cmdlet Microsoft.PowerShell.Utility
Group-Object Cmdlet Microsoft.PowerShell.Utility
Get-Variable Cmdlet Microsoft.PowerShell.Utility
Get-Uptime Cmdlet Microsoft.PowerShell.Utility
Get-Unique Cmdlet Microsoft.PowerShell.Utility
Get-UICulture Cmdlet Microsoft.PowerShell.Utility
Get-TypeData Cmdlet Microsoft.PowerShell.Utility
Get-TraceSource Cmdlet Microsoft.PowerShell.Utility
Get-RunspaceDebug Cmdlet Microsoft.PowerShell.Utility
Invoke-Command Cmdlet Microsoft.PowerShell.Core
Invoke-Expression Cmdlet Microsoft.PowerShell.Utility
Invoke-History Cmdlet Microsoft.PowerShell.Core
Invoke-Item Cmdlet Microsoft.PowerShell.Management
New-PSSession Cmdlet Microsoft.PowerShell.Core
New-PSRoleCapabilityFile Cmdlet Microsoft.PowerShell.Core
New-PSDrive Cmdlet Microsoft.PowerShell.Management
New-Object Cmdlet Microsoft.PowerShell.Utility
New-ModuleManifest Cmdlet Microsoft.PowerShell.Core
New-Module Cmdlet Microsoft.PowerShell.Core
New-ItemProperty Cmdlet Microsoft.PowerShell.Management
New-Item Cmdlet Microsoft.PowerShell.Management
Get-Runspace Cmdlet Microsoft.PowerShell.Utility
New-Guid Cmdlet Microsoft.PowerShell.Utility
New-Alias Cmdlet Microsoft.PowerShell.Utility
Move-ItemProperty Cmdlet Microsoft.PowerShell.Management
Move-Item Cmdlet Microsoft.PowerShell.Management
Measure-Object Cmdlet Microsoft.PowerShell.Utility
Measure-Command Cmdlet Microsoft.PowerShell.Utility
Join-Path Cmdlet Microsoft.PowerShell.Management
Invoke-WebRequest Cmdlet Microsoft.PowerShell.Utility
Invoke-RestMethod Cmdlet Microsoft.PowerShell.Utility
New-Event Cmdlet Microsoft.PowerShell.Utility
Get-Random Cmdlet Microsoft.PowerShell.Utility
Get-PSSessionConfiguration Cmdlet Microsoft.PowerShell.Core
Get-PSSessionCapability Cmdlet Microsoft.PowerShell.Core
Get-FormatData Cmdlet Microsoft.PowerShell.Utility
Get-ExecutionPolicy Cmdlet Microsoft.PowerShell.Security
Get-EventSubscriber Cmdlet Microsoft.PowerShell.Utility
Get-Event Cmdlet Microsoft.PowerShell.Utility
Get-Date Cmdlet Microsoft.PowerShell.Utility
Get-Culture Cmdlet Microsoft.PowerShell.Utility
Get-Credential Cmdlet Microsoft.PowerShell.Security
Get-Content Cmdlet Microsoft.PowerShell.Management
Get-Help Cmdlet Microsoft.PowerShell.Core
Get-Command Cmdlet Microsoft.PowerShell.Core
Get-Alias Cmdlet Microsoft.PowerShell.Utility
Format-Wide Cmdlet Microsoft.PowerShell.Utility
Format-Table Cmdlet Microsoft.PowerShell.Utility
Format-List Cmdlet Microsoft.PowerShell.Utility
Format-Custom Cmdlet Microsoft.PowerShell.Utility
ForEach-Object Cmdlet Microsoft.PowerShell.Core
Find-PackageProvider Cmdlet PackageManagement
Find-Package Cmdlet PackageManagement
Get-ChildItem Cmdlet Microsoft.PowerShell.Management
New-PSSessionConfigurationFile Cmdlet Microsoft.PowerShell.Core
Get-History Cmdlet Microsoft.PowerShell.Core
Get-Item Cmdlet Microsoft.PowerShell.Management
Get-PSSession Cmdlet Microsoft.PowerShell.Core
Get-PSReadlineOption Cmdlet PSReadLine
Get-PSReadlineKeyHandler Cmdlet PSReadLine
Get-PSProvider Cmdlet Microsoft.PowerShell.Management
Get-PSHostProcessInfo Cmdlet Microsoft.PowerShell.Core
Get-PSDrive Cmdlet Microsoft.PowerShell.Management
Get-PSCallStack Cmdlet Microsoft.PowerShell.Utility
Get-PSBreakpoint Cmdlet Microsoft.PowerShell.Utility
Get-Host Cmdlet Microsoft.PowerShell.Utility
Get-Process Cmdlet Microsoft.PowerShell.Management
Get-PackageProvider Cmdlet PackageManagement
Get-Package Cmdlet PackageManagement
Get-Module Cmdlet Microsoft.PowerShell.Core
Get-Member Cmdlet Microsoft.PowerShell.Utility
Get-Location Cmdlet Microsoft.PowerShell.Management
Get-Job Cmdlet Microsoft.PowerShell.Core
Get-ItemPropertyValue Cmdlet Microsoft.PowerShell.Management
Get-ItemProperty Cmdlet Microsoft.PowerShell.Management
Get-PackageSource Cmdlet PackageManagement
New-PSSessionOption Cmdlet Microsoft.PowerShell.Core
New-PSTransportOption Cmdlet Microsoft.PowerShell.Core
New-TemporaryFile Cmdlet Microsoft.PowerShell.Utility
Tee-Object Cmdlet Microsoft.PowerShell.Utility
Stop-Transcript Cmdlet Microsoft.PowerShell.Host
Stop-Process Cmdlet Microsoft.PowerShell.Management
Stop-Job Cmdlet Microsoft.PowerShell.Core
Start-Transcript Cmdlet Microsoft.PowerShell.Host
Start-Sleep Cmdlet Microsoft.PowerShell.Utility
Start-Process Cmdlet Microsoft.PowerShell.Management
Start-Job Cmdlet Microsoft.PowerShell.Core
Test-ModuleManifest Cmdlet Microsoft.PowerShell.Core
Split-Path Cmdlet Microsoft.PowerShell.Management
Set-Variable Cmdlet Microsoft.PowerShell.Utility
Set-TraceSource Cmdlet Microsoft.PowerShell.Utility
Set-StrictMode Cmdlet Microsoft.PowerShell.Core
Set-PSSessionConfiguration Cmdlet Microsoft.PowerShell.Core
Set-PSReadlineOption Cmdlet PSReadLine
Set-PSReadlineKeyHandler Cmdlet PSReadLine
Set-PSDebug Cmdlet Microsoft.PowerShell.Core
Set-PSBreakpoint Cmdlet Microsoft.PowerShell.Utility
Sort-Object Cmdlet Microsoft.PowerShell.Utility
Set-PackageSource Cmdlet PackageManagement
Test-Path Cmdlet Microsoft.PowerShell.Management
Trace-Command Cmdlet Microsoft.PowerShell.Utility
Write-Progress Cmdlet Microsoft.PowerShell.Utility
Write-Output Cmdlet Microsoft.PowerShell.Utility
Write-Information Cmdlet Microsoft.PowerShell.Utility
Write-Host Cmdlet Microsoft.PowerShell.Utility
Write-Error Cmdlet Microsoft.PowerShell.Utility
Write-Debug Cmdlet Microsoft.PowerShell.Utility
Where-Object Cmdlet Microsoft.PowerShell.Core
Wait-Process Cmdlet Microsoft.PowerShell.Management
Test-PSSessionConfigurationFile Cmdlet Microsoft.PowerShell.Core
Wait-Job Cmdlet Microsoft.PowerShell.Core
Wait-Debugger Cmdlet Microsoft.PowerShell.Utility
Update-TypeData Cmdlet Microsoft.PowerShell.Utility
Update-Help Cmdlet Microsoft.PowerShell.Core
Update-FormatData Cmdlet Microsoft.PowerShell.Utility
Unregister-PSSessionConfiguration Cmdlet Microsoft.PowerShell.Core
Unregister-PackageSource Cmdlet PackageManagement
Unregister-Event Cmdlet Microsoft.PowerShell.Utility
Uninstall-Package Cmdlet PackageManagement
Wait-Event Cmdlet Microsoft.PowerShell.Utility
Export-PSSession Cmdlet Microsoft.PowerShell.Utility
Set-Location Cmdlet Microsoft.PowerShell.Management
Set-Item Cmdlet Microsoft.PowerShell.Management
Remove-Event Cmdlet Microsoft.PowerShell.Utility
Register-PSSessionConfiguration Cmdlet Microsoft.PowerShell.Core
Register-PackageSource Cmdlet PackageManagement
Register-ObjectEvent Cmdlet Microsoft.PowerShell.Utility
Register-EngineEvent Cmdlet Microsoft.PowerShell.Utility
Register-ArgumentCompleter Cmdlet Microsoft.PowerShell.Core
Receive-PSSession Cmdlet Microsoft.PowerShell.Core
Receive-Job Cmdlet Microsoft.PowerShell.Core
Remove-Item Cmdlet Microsoft.PowerShell.Management
Read-Host Cmdlet Microsoft.PowerShell.Utility
Pop-Location Cmdlet Microsoft.PowerShell.Management
Out-String Cmdlet Microsoft.PowerShell.Utility
Out-Null Cmdlet Microsoft.PowerShell.Core
Out-Host Cmdlet Microsoft.PowerShell.Core
Out-File Cmdlet Microsoft.PowerShell.Utility
Out-Default Cmdlet Microsoft.PowerShell.Core
New-Variable Cmdlet Microsoft.PowerShell.Utility
New-TimeSpan Cmdlet Microsoft.PowerShell.Utility
Push-Location Cmdlet Microsoft.PowerShell.Management
Set-ItemProperty Cmdlet Microsoft.PowerShell.Management
Remove-ItemProperty Cmdlet Microsoft.PowerShell.Management
Remove-Module Cmdlet Microsoft.PowerShell.Core
Set-ExecutionPolicy Cmdlet Microsoft.PowerShell.Security
Set-Date Cmdlet Microsoft.PowerShell.Utility
Set-Content Cmdlet Microsoft.PowerShell.Management
Set-Alias Cmdlet Microsoft.PowerShell.Utility
Select-Xml Cmdlet Microsoft.PowerShell.Utility
Select-String Cmdlet Microsoft.PowerShell.Utility
Select-Object Cmdlet Microsoft.PowerShell.Utility
Save-Package Cmdlet PackageManagement
Remove-Job Cmdlet Microsoft.PowerShell.Core
Save-Help Cmdlet Microsoft.PowerShell.Core
Rename-ItemProperty Cmdlet Microsoft.PowerShell.Management
Rename-Item Cmdlet Microsoft.PowerShell.Management
Remove-Variable Cmdlet Microsoft.PowerShell.Utility
Remove-TypeData Cmdlet Microsoft.PowerShell.Utility
Remove-PSSession Cmdlet Microsoft.PowerShell.Core
Remove-PSReadlineKeyHandler Cmdlet PSReadLine
Remove-PSDrive Cmdlet Microsoft.PowerShell.Management
Remove-PSBreakpoint Cmdlet Microsoft.PowerShell.Utility
Resolve-Path Cmdlet Microsoft.PowerShell.Management
Write-Verbose Cmdlet Microsoft.PowerShell.Utility
Export-ModuleMember Cmdlet Microsoft.PowerShell.Core
Export-Csv Cmdlet Microsoft.PowerShell.Utility
In Function Pester
ImportSystemModules Function  
ImportClassResourcesFromModule Function PSDesiredStateConfiguration
ImportCimAndScriptKeywordsFromModule Function PSDesiredStateConfiguration
Import-PowerShellDataFile Function Microsoft.PowerShell.Utility
help Function  
GetSyntax Function PSDesiredStateConfiguration
GetResourceFromKeyword Function PSDesiredStateConfiguration
GetPatterns Function PSDesiredStateConfiguration
GetModule Function PSDesiredStateConfiguration
GetImplementingModulePath Function PSDesiredStateConfiguration
GetCompositeResource Function PSDesiredStateConfiguration
Get-Verb Function  
Get-TestDriveItem Function Pester
Get-PublicKeyFromStore Function PSDesiredStateConfiguration
Get-PublicKeyFromFile Function PSDesiredStateConfiguration
Get-PSTopConfigurationName Function PSDesiredStateConfiguration
Initialize-ConfigurationRuntimeState Function PSDesiredStateConfiguration
InModuleScope Function Pester
Install-Module Function PowerShellGet
Install-Script Function PowerShellGet
ReadEnvironmentFile Function PSDesiredStateConfiguration
Publish-Script Function PowerShellGet
Publish-Module Function PowerShellGet
PSConsoleHostReadline Function PSReadLine
prompt Function  
Pause Function  
oss Function  
Node Function PSDesiredStateConfiguration
Get-PSRepository Function PowerShellGet
New-ScriptFileInfo Function PowerShellGet
New-DscChecksum Function PSDesiredStateConfiguration
more Function  
Mock Function Pester
It Function Pester
IsPatternMatched Function PSDesiredStateConfiguration
IsHiddenResource Function PSDesiredStateConfiguration
Invoke-Pester Function Pester
Invoke-Mock Function Pester
New-Fixture Function Pester
Get-PSMetaConfigurationProcessed Function PSDesiredStateConfiguration
Get-PSMetaConfigDocumentInstVersionInfo Function PSDesiredStateConfiguration
Get-PSDefaultConfigurationDocument Function PSDesiredStateConfiguration
Expand-Archive Function Microsoft.PowerShell.Archive
Describe Function Pester
ConvertTo-MOFInstance Function PSDesiredStateConfiguration
Context Function Pester
Configuration Function PSDesiredStateConfiguration
Compress-Archive Function Microsoft.PowerShell.Archive
Clear-Host Function  
CheckResourceFound Function PSDesiredStateConfiguration
Find-Command Function PowerShellGet
cd\ Function  
BeforeEach Function Pester
BeforeAll Function Pester
Assert-VerifiableMocks Function Pester
Assert-MockCalled Function Pester
AfterEach Function Pester
AfterAll Function Pester
AddDscResourcePropertyFromMetadata Function PSDesiredStateConfiguration
AddDscResourceProperty Function PSDesiredStateConfiguration
cd.. Function  
Register-PSRepository Function PowerShellGet
Find-DscResource Function PowerShellGet
Find-RoleCapability Function PowerShellGet
Get-PSCurrentConfigurationNode Function PSDesiredStateConfiguration
Get-PositionInfo Function PSDesiredStateConfiguration
Get-MofInstanceText Function PSDesiredStateConfiguration
Get-MofInstanceName Function PSDesiredStateConfiguration
Get-MockDynamicParameters Function Pester
Get-InstalledScript Function PowerShellGet
Get-InstalledModule Function PowerShellGet
Get-InnerMostErrorRecord Function PSDesiredStateConfiguration
Find-Module Function PowerShellGet
Get-FileHash Function Microsoft.PowerShell.Utility
Get-DSCResourceModules Function PSDesiredStateConfiguration
Get-DscResource Function PSDesiredStateConfiguration
Get-ConfigurationErrorCount Function PSDesiredStateConfiguration
Get-ComplexResourceQualifier Function PSDesiredStateConfiguration
Get-CompatibleVersionAddtionaPropertiesStr Function PSDesiredStateConfiguration
Generate-VersionInfo Function PSDesiredStateConfiguration
Format-Hex Function Microsoft.PowerShell.Utility
Find-Script Function PowerShellGet
Get-EncryptedPassword Function PSDesiredStateConfiguration
Save-Module Function PowerShellGet
Save-Script Function PowerShellGet
Set-DynamicParameterVariables Function Pester
ConvertTo-Csv Cmdlet Microsoft.PowerShell.Utility
ConvertFrom-StringData Cmdlet Microsoft.PowerShell.Utility
ConvertFrom-SecureString Cmdlet Microsoft.PowerShell.Security
ConvertFrom-Json Cmdlet Microsoft.PowerShell.Utility
ConvertFrom-Csv Cmdlet Microsoft.PowerShell.Utility
Convert-Path Cmdlet Microsoft.PowerShell.Management
Connect-PSSession Cmdlet Microsoft.PowerShell.Core
Compare-Object Cmdlet Microsoft.PowerShell.Utility
ConvertTo-Html Cmdlet Microsoft.PowerShell.Utility
Clear-Variable Cmdlet Microsoft.PowerShell.Utility
Clear-Item Cmdlet Microsoft.PowerShell.Management
Clear-History Cmdlet Microsoft.PowerShell.Core
Clear-Content Cmdlet Microsoft.PowerShell.Management
Add-Type Cmdlet Microsoft.PowerShell.Utility
Add-Member Cmdlet Microsoft.PowerShell.Utility
Add-History Cmdlet Microsoft.PowerShell.Core
Add-Content Cmdlet Microsoft.PowerShell.Management
WriteFile Function PSDesiredStateConfiguration
Clear-ItemProperty Cmdlet Microsoft.PowerShell.Management
Write-NodeMOFFile Function PSDesiredStateConfiguration
ConvertTo-Json Cmdlet Microsoft.PowerShell.Utility
ConvertTo-Xml Cmdlet Microsoft.PowerShell.Utility
Export-Clixml Cmdlet Microsoft.PowerShell.Utility
Export-Alias Cmdlet Microsoft.PowerShell.Utility
Exit-PSSession Cmdlet Microsoft.PowerShell.Core
Exit-PSHostProcess Cmdlet Microsoft.PowerShell.Core
Enter-PSSession Cmdlet Microsoft.PowerShell.Core
Enter-PSHostProcess Cmdlet Microsoft.PowerShell.Core
Enable-RunspaceDebug Cmdlet Microsoft.PowerShell.Utility
Enable-PSSessionConfiguration Cmdlet Microsoft.PowerShell.Core
ConvertTo-SecureString Cmdlet Microsoft.PowerShell.Security
Enable-PSBreakpoint Cmdlet Microsoft.PowerShell.Utility
Disable-RunspaceDebug Cmdlet Microsoft.PowerShell.Utility
Disable-PSSessionConfiguration Cmdlet Microsoft.PowerShell.Core
Disable-PSBreakpoint Cmdlet Microsoft.PowerShell.Utility
Debug-Runspace Cmdlet Microsoft.PowerShell.Utility
Debug-Process Cmdlet Microsoft.PowerShell.Management
Debug-Job Cmdlet Microsoft.PowerShell.Core
Copy-ItemProperty Cmdlet Microsoft.PowerShell.Management
Copy-Item Cmdlet Microsoft.PowerShell.Management
Disconnect-PSSession Cmdlet Microsoft.PowerShell.Core
Export-FormatData Cmdlet Microsoft.PowerShell.Utility
Write-MetaConfigFile Function PSDesiredStateConfiguration
ValidateUpdate-ConfigurationData Function PSDesiredStateConfiguration
Test-NodeManager Function PSDesiredStateConfiguration
Test-MofInstanceText Function PSDesiredStateConfiguration
Test-ModuleReloadRequired Function PSDesiredStateConfiguration
Test-ConflictingResources Function PSDesiredStateConfiguration
TabExpansion2 Function  
StrongConnect Function PSDesiredStateConfiguration
Should Function Pester
Setup Function Pester
Test-NodeResources Function PSDesiredStateConfiguration
Set-PSTopConfigurationName Function PSDesiredStateConfiguration
Set-PSMetaConfigVersionInfoV2 Function PSDesiredStateConfiguration
Set-PSMetaConfigDocInsProcessedBeforeMeta Function PSDesiredStateConfiguration
Set-PSDefaultConfigurationDocument Function PSDesiredStateConfiguration
Set-PSCurrentConfigurationNode Function PSDesiredStateConfiguration
Set-NodeResourceSource Function PSDesiredStateConfiguration
Set-NodeResources Function PSDesiredStateConfiguration
Set-NodeManager Function PSDesiredStateConfiguration
Set-NodeExclusiveResources Function PSDesiredStateConfiguration
Set-PSRepository Function PowerShellGet
Write-Log Function PSDesiredStateConfiguration
Test-NodeResourceSource Function PSDesiredStateConfiguration
ThrowError Function PSDesiredStateConfiguration
ValidateNoNameNodeResources Function PSDesiredStateConfiguration
ValidateNodeResourceSource Function PSDesiredStateConfiguration
ValidateNodeResources Function PSDesiredStateConfiguration
ValidateNodeManager Function PSDesiredStateConfiguration
ValidateNodeExclusiveResources Function PSDesiredStateConfiguration
ValidateNoCircleInNodeResources Function PSDesiredStateConfiguration
Update-ScriptFileInfo Function PowerShellGet
Update-Script Function PowerShellGet
Test-ScriptFileInfo Function PowerShellGet
Update-ModuleVersion Function PSDesiredStateConfiguration
Update-Module Function PowerShellGet
Update-LocalConfigManager Function PSDesiredStateConfiguration
Update-DependsOn Function PSDesiredStateConfiguration
Update-ConfigurationErrorCount Function PSDesiredStateConfiguration
Update-ConfigurationDocumentRef Function PSDesiredStateConfiguration
Unregister-PSRepository Function PowerShellGet
Uninstall-Script Function PowerShellGet
Uninstall-Module Function PowerShellGet
Update-ModuleManifest Function PowerShellGet
Write-Warning Cmdlet Microsoft.PowerShell.Utility
时间: 2024-08-05 15:06:37

CentOS 7 上面安装PowerShell的相关文章

在CentOS上安装PowerShell

微软刚刚开源了PowerShell,目前在Linux和MacOS上都能安装.具体的链接如下: https://github.com/PowerShell/PowerShell 本文将介绍如何在CentOS 7.2下安装PowerShell. 首先在CentOS下下载PowerShell的安装包: wget https://github.com/PowerShell/PowerShell/releases/download/v6.0.0-alpha.9/powershell-6.0.0_alpha

centos 6.5安装NodeJS

centos 6.5安装NodeJS 下载 可以在本地下载node.js最新版,然后通过ftp工具上传到服务器,或者直接在服务器终端使用wget命令下载(我当时下载的是node-v7.5.0-linux-x86版本,其他版本请查看上面链接然后替换即可): $ wget http://nodejs.org/dist/latest/node-v7.5.0-linux-x86.tar.gz 解压 进入服务器终端,找到上传或者下载的安装包,解压 $ tar -zvxf node-v7.5.0-linux

MongoDB 3.2 在CentOS 上的安装和配置

MongoDB 3.2 在CentOS 上的安装和配置 2016-01-06 14:41:41 发布 您的评价:       0.0   收藏     0收藏 一.安装 编辑/etc/yum.repos.d/mongodb-org-3.2.repo [mongodb-org-3.2] name=MongoDB Repository baseurl=https://repo.mongodb.org/yum/redhat/$releasever/mongodb-org/3.2/x86_64/ gpg

Centos 7 一键安装openstack

系统:Centos7x64 单节点 CentOS yum 快速安装: # 安装RDO repo $ sudo yum install -y https://www.rdoproject.org/repos/rdo-release.rpm # 更新repo源 $ sudo yum update -y # 安装openstack-packstack $ sudo yum install -y openstack-packstack # 执行部署过程 $ packstack --allinone 访问

CentOS 7 yum安装Zabbix

CentOS 7 yum安装Zabbix 一.Zabbix简介 zabbix是一个基于WEB界面的提供分布式系统监视以及网络监视功能的企业级的开源解决方案.zabbix能监视各种网络参数,保证服务器系统的安全运营:并提供灵活的通知机制以让系统管理员快速定位/解决存在的各种问题. 下面是Centos7上yum安装zabbix的步骤. 二.Zabbix安装 本文档在同一台机器上安装了zabbix-server 和zabbix-agent 自己监控自己. 1.配置LAMP 参照下面的链接 Centos

CentOS 6.5 安装部署iSCSi共享存储

 CentOS 6.5 安装部署iSCSi共享存储 一.前言 1.什么是iSCSI? iSCSI技术是一种由IBM公司研究开发的,是一个供硬件设备使用的可以在IP协议的上层运行的SCSI指令集,这种指令集合可以实现在IP网络上运行SCSI协议,使其能够在诸如高速千兆以太网上进行路由选择.iSCSI技术是一种新储存技术,该技术是将现有SCSI接口与以太网络(Ethernet)技术结合,使服务器可与使用IP网络的储存装置互相交换资料. iSCSI:Internet 小型计算机系统接口 (iSCSI:

在Windows Server 2008 R2上安装 PowerShell 5.0

在Windows Server 2008 R2上安装 PowerShell 5.0 安装.NET Framework 4.6.2 下载NDP462-KB3151800-x86-x64-AllOS-ENU.exe,安装 安装PowerShell 4.0(5.0依赖4.0) 下载Windows6.1-KB2819745-x64-MultiPkg.msu,安装. 安装PowerShell5.0 下载Win7AndW2K8R2-KB3134760-x64.msu,安装. 完成后,重启服务器.

CentOS 6.8安装Samba 4做Windows共享服务器

在某些情况下为了实现Windows多台服务器负载均衡,需要使用共享来做图片及附件的上传空间. 这个时候就需要使用到Samba.IIS虚拟目录等相关技术 Web服务器使用upload作为上传的目录,现在需要使用2台服务器做负载均衡,后台使用一台Samba服务器作为文件共享存储 1.建立Samba文件服务器 卸载旧的samba组件,CentOS 6默认安装的是3.6的版本 for a in `rpm -qa|grep samba`; do rpm -e --nodeps $a;done 2.安装Sa

centos的软件安装方法rpm和yum

centos的软件安装大致可以分为两种类型: [centos]rpm文件安装,使用rpm指令  类似[ubuntu]deb文件安装,使用dpkg指令 [centos]yum安装   类似[ubuntu]apt-get安装 rpm命令 (一)查询系统装已经安装的软件信息 对于一个rpm包来说,都是有"-"和"."构成的,基本上有以下几部分组成: * 包名 * 版本信息 * 发布版本号 * 运行平台,当出现noarch,代表的是软件可以平台兼容 1)查询系统中已经安装的