Merge pull request #1260 from PowerShell/vors/events

Resources for Events and Modules restructure
This commit is contained in:
Sergei Vorobev 2016-07-01 14:52:46 -07:00 committed by GitHub
commit b26e58d2a2
77 changed files with 675 additions and 127 deletions

2
.gitmodules vendored
View file

@ -1,5 +1,5 @@
[submodule "src/Modules/Pester"]
path = src/Modules/Pester
path = src/Modules/Shared/Pester
url = https://github.com/PowerShell/psl-pester.git
branch = develop
ignore = dirty

View file

@ -11,7 +11,7 @@ git:
submodules: false
before_install:
- git config --global url.git@github.com:.insteadOf https://github.com/
- git submodule update --init -- src/Modules/Pester src/libpsl-native/test/googletest
- git submodule update --init
- ./tools/download.sh
script:
- ulimit -n 4096; powershell -c "Import-Module ./build.psm1; Start-PSBootstrap; Start-PSBuild -Publish; Start-PSPester; Start-PSxUnit"

View file

@ -18,7 +18,7 @@ install:
- ps: $fileContent += "`n-----END RSA PRIVATE KEY-----`n"
- ps: Set-Content c:\users\appveyor\.ssh\id_rsa $fileContent
- git config --global url.git@github.com:.insteadOf https://github.com/
- git submodule update --init -- src/Modules/Pester
- git submodule update --init
- ps: Import-Module .\build.psm1; Start-PSBootstrap
build_script:
@ -43,7 +43,7 @@ test_script:
$env:FullOutput = Split-Path -Parent (Get-PSOutput -Options (New-PSOptions -FullCLR))
Write-Host -Foreground Green 'Run FullCLR tests'
$testResultsFileFullCLR = "$pwd\TestsResults.FullCLR.xml"
Start-DevPSGitHub -binDir $env:FullOutput -NoNewWindow -ArgumentList '-noprofile', '-noninteractive', '-command', "Import-Module .\src\Modules\Pester; Invoke-Pester test/fullCLR -OutputFormat NUnitXml -OutputFile $testResultsFileFullCLR"
Start-DevPowerShell -NoNewWindow -ArgumentList '-noprofile', '-noninteractive' -Command "Invoke-Pester test/fullCLR -OutputFormat NUnitXml -OutputFile $testResultsFileFullCLR"
(New-Object 'System.Net.WebClient').UploadFile("https://ci.appveyor.com/api/testresults/nunit/$($env:APPVEYOR_JOB_ID)", (Resolve-Path $testResultsFileFullCLR))
#
# Fail the build, if tests failed

View file

@ -59,12 +59,11 @@ function Start-PSBuild {
[switch]$XamlGen,
[Parameter(ParameterSetName='FullCLR')]
[string]$cmakeGenerator = "Visual Studio 14 2015 Win64",
[ValidateSet('x86', 'x64')]
[string]$NativeHostArch = "x64",
[Parameter(ParameterSetName='FullCLR')]
[ValidateSet("Debug",
"Release")]
[string]$msbuildConfiguration = "Release"
[ValidateSet('Linux', 'Debug', 'Release', '')]
[string]$Configuration
)
if ($Clean)
@ -104,6 +103,26 @@ function Start-PSBuild {
throw 'mc.exe not found. Install Microsoft Windows SDK.'
}
# setup msbuild configuration
if ($Configuration -eq 'Debug' -or $Configuration -eq 'Release')
{
$msbuildConfiguration = $Configuration
}
else
{
$msbuildConfiguration = 'Release'
}
# setup cmakeGenerator
if ($NativeHostArch -eq 'x86')
{
$cmakeGenerator = 'Visual Studio 14 2015'
}
else
{
$cmakeGenerator = 'Visual Studio 14 2015 Win64'
}
} elseif ($IsLinux -or $IsOSX) {
foreach ($Dependency in 'cmake', 'make', 'g++') {
$precheck = $precheck -and (precheck $Dependency "Build dependency '$Dependency' not found. Run Start-PSBootstrap.")
@ -116,7 +135,7 @@ function Start-PSBuild {
}
# set output options
$OptionsArguments = @{Publish=$Publish; Output=$Output; FullCLR=$FullCLR; Runtime=$Runtime}
$OptionsArguments = @{Publish=$Publish; Output=$Output; FullCLR=$FullCLR; Runtime=$Runtime; Configuration=$Configuration; Verbose=$true}
$script:Options = New-PSOptions @OptionsArguments
# setup arguments
@ -239,7 +258,7 @@ function Start-PSBuild {
function New-PSOptions {
[CmdletBinding()]
param(
[ValidateSet("Linux", "Debug", "Release")]
[ValidateSet("Linux", "Debug", "Release", "")]
[string]$Configuration,
[ValidateSet("netcoreapp1.0", "net451")]
@ -279,7 +298,7 @@ function New-PSOptions {
} elseif ($IsWindows) {
"Debug"
}
log "Using configuration '$Configuration'"
Write-Verbose "Using configuration '$Configuration'"
}
if (-not $Framework) {
@ -288,7 +307,7 @@ function New-PSOptions {
} else {
"netcoreapp1.0"
}
log "Using framework '$Framework'"
Write-Verbose "Using framework '$Framework'"
}
if (-not $Runtime) {
@ -301,7 +320,7 @@ function New-PSOptions {
if (-not $Runtime) {
Throw "Could not determine Runtime Identifier, please update dotnet"
} else {
log "Using runtime '$Runtime'"
Write-Verbose "Using runtime '$Runtime'"
}
}
@ -649,20 +668,37 @@ function Publish-NuGetFeed
}
function Start-DevPSGitHub {
function Start-DevPowerShell {
param(
[switch]$ZapDisable,
[string[]]$ArgumentList = '',
[switch]$LoadProfile,
[string]$binDir = "$PSScriptRoot\src\Microsoft.PowerShell.ConsoleHost\bin\Debug\net451",
[switch]$NoNewWindow
[string]$binDir = (Split-Path (New-PSOptions -FullCLR).Output),
[switch]$NoNewWindow,
[string]$Command,
[switch]$KeepPSModulePath
)
try {
if ($LoadProfile -eq $false) {
if (-not $LoadProfile) {
$ArgumentList = @('-noprofile') + $ArgumentList
}
if (-not $KeepPSModulePath)
{
if (-not $Command)
{
$ArgumentList = @('-NoExit') + $ArgumentList
}
$Command = '$env:PSModulePath = Join-Path $env:DEVPATH Modules; ' + $Command
}
if ($Command)
{
$ArgumentList = $ArgumentList + @("-command $Command")
}
$env:DEVPATH = $binDir
if ($ZapDisable) {
$env:COMPLUS_ZapDisable = 1
@ -841,7 +877,16 @@ function Get-Mappings
{
$map = @{}
$mapFiles | % {
$rawHashtable = $_ | Get-Content -Raw | ConvertFrom-Json | Convert-PSObjectToHashtable
$file = $_
try
{
$rawHashtable = $_ | Get-Content -Raw | ConvertFrom-Json | Convert-PSObjectToHashtable
}
catch
{
Write-Error "Exception, when processing $($file.FullName): $_"
}
$mapRoot = Split-Path $_.FullName
if ($KeepRelativePaths)
{
@ -986,6 +1031,37 @@ function Find-Dotnet() {
}
}
<#
This is one-time conversion. We use it for to turn GetEventResources.txt into GetEventResources.resx
.EXAMPLE Convert-TxtResourceToXml -Path Microsoft.PowerShell.Commands.Diagnostics\resources
#>
function Convert-TxtResourceToXml
{
param(
[string[]]$Path
)
process
{
$Path | % {
Get-ChildItem $_ -Filter "*.txt" | % {
$txtFile = $_.FullName
$resxFile = Join-Path (Split-Path $txtFile) "$($_.BaseName).resx"
$resourceHashtable = ConvertFrom-StringData (Get-Content -Raw $txtFile)
$resxContent = $resourceHashtable.GetEnumerator() | % {
@'
<data name="{0}" xml:space="preserve">
<value>{1}</value>
</data>
'@ -f $_.Key, $_.Value
} | Out-String
Set-Content -Path $resxFile -Value ($script:RESX_TEMPLATE -f $resxContent)
}
}
}
}
function Start-XamlGen
{
[CmdletBinding()]
@ -1557,3 +1633,128 @@ function New-AppxPackage
return $appxPackagePath
}
$script:RESX_TEMPLATE = @'
<?xml version="1.0" encoding="utf-8"?>
<root>
<!--
Microsoft ResX Schema
Version 2.0
The primary goals of this format is to allow a simple XML format
that is mostly human readable. The generation and parsing of the
various data types are done through the TypeConverter classes
associated with the data types.
Example:
... ado.net/XML headers & schema ...
<resheader name="resmimetype">text/microsoft-resx</resheader>
<resheader name="version">2.0</resheader>
<resheader name="reader">System.Resources.ResXResourceReader, System.Windows.Forms, ...</resheader>
<resheader name="writer">System.Resources.ResXResourceWriter, System.Windows.Forms, ...</resheader>
<data name="Name1"><value>this is my long string</value><comment>this is a comment</comment></data>
<data name="Color1" type="System.Drawing.Color, System.Drawing">Blue</data>
<data name="Bitmap1" mimetype="application/x-microsoft.net.object.binary.base64">
<value>[base64 mime encoded serialized .NET Framework object]</value>
</data>
<data name="Icon1" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
<value>[base64 mime encoded string representing a byte array form of the .NET Framework object]</value>
<comment>This is a comment</comment>
</data>
There are any number of "resheader" rows that contain simple
name/value pairs.
Each data row contains a name, and value. The row also contains a
type or mimetype. Type corresponds to a .NET class that support
text/value conversion through the TypeConverter architecture.
Classes that don't support this are serialized and stored with the
mimetype set.
The mimetype is used for serialized objects, and tells the
ResXResourceReader how to depersist the object. This is currently not
extensible. For a given mimetype the value must be set accordingly:
Note - application/x-microsoft.net.object.binary.base64 is the format
that the ResXResourceWriter will generate, however the reader can
read any of the formats listed below.
mimetype: application/x-microsoft.net.object.binary.base64
value : The object must be serialized with
: System.Runtime.Serialization.Formatters.Binary.BinaryFormatter
: and then encoded with base64 encoding.
mimetype: application/x-microsoft.net.object.soap.base64
value : The object must be serialized with
: System.Runtime.Serialization.Formatters.Soap.SoapFormatter
: and then encoded with base64 encoding.
mimetype: application/x-microsoft.net.object.bytearray.base64
value : The object must be serialized into a byte array
: using a System.ComponentModel.TypeConverter
: and then encoded with base64 encoding.
-->
<xsd:schema id="root" xmlns="" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata">
<xsd:import namespace="http://www.w3.org/XML/1998/namespace" />
<xsd:element name="root" msdata:IsDataSet="true">
<xsd:complexType>
<xsd:choice maxOccurs="unbounded">
<xsd:element name="metadata">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="value" type="xsd:string" minOccurs="0" />
</xsd:sequence>
<xsd:attribute name="name" use="required" type="xsd:string" />
<xsd:attribute name="type" type="xsd:string" />
<xsd:attribute name="mimetype" type="xsd:string" />
<xsd:attribute ref="xml:space" />
</xsd:complexType>
</xsd:element>
<xsd:element name="assembly">
<xsd:complexType>
<xsd:attribute name="alias" type="xsd:string" />
<xsd:attribute name="name" type="xsd:string" />
</xsd:complexType>
</xsd:element>
<xsd:element name="data">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
<xsd:element name="comment" type="xsd:string" minOccurs="0" msdata:Ordinal="2" />
</xsd:sequence>
<xsd:attribute name="name" type="xsd:string" use="required" msdata:Ordinal="1" />
<xsd:attribute name="type" type="xsd:string" msdata:Ordinal="3" />
<xsd:attribute name="mimetype" type="xsd:string" msdata:Ordinal="4" />
<xsd:attribute ref="xml:space" />
</xsd:complexType>
</xsd:element>
<xsd:element name="resheader">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
</xsd:sequence>
<xsd:attribute name="name" type="xsd:string" use="required" />
</xsd:complexType>
</xsd:element>
</xsd:choice>
</xsd:complexType>
</xsd:element>
</xsd:schema>
<resheader name="resmimetype">
<value>text/microsoft-resx</value>
</resheader>
<resheader name="version">
<value>2.0</value>
</resheader>
<resheader name="reader">
<value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</resheader>
<resheader name="writer">
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</resheader>
{0}
</root>
'@

View file

@ -32,14 +32,3 @@ it should be listed as a dependency for FullCLR $Top folder (src\Microsoft.Power
* If assembly is part of CoreCLR build,
it should be listed as a dependency for CoreCLR $Top folder (src\powershell)
Modules
----------
There are 3 modules directories with the same purpose: they have **content** files (i.e. `*.psm1`, `*.psd1`)
which would be binplaced by `dotnet`
- `src\Modules` shared between all flavours
- `src\Microsoft.PowerShell.ConsoleHost\Modules` FullCLR (Windows)
- `src\powershell\Modules` CoreCLR (all platforms)

View file

@ -51,7 +51,7 @@ module.
Because the `ConsoleHost` project (*not* the `Host` project) is a
library and not an application (in the sense that .NET CLI does not
emit a native executable using .NET Core's `corehost`), it targets the
framework `netstandard1.5`, *not* `netcoreapp1.0`, and the build
framework `netstandard1.6`, *not* `netcoreapp1.0`, and the build
output will *not* have a runtime identifier in the path.
Thus the output location of `powershell.exe` will be
@ -69,34 +69,24 @@ Assembly Cache (GAC), not your output directory.
and run side-by-side.
```powershell
Start-DevPSGithub
Start-DevPowerShell
```
This command has a reasonable default to run `powershell.exe` from the build output folder.
If you are building an unusual configuration (i.e. not `Debug`), you can explicitly specify path to the bin directory
```powershell
Start-DevPSGithub -binDir .\src\Microsoft.PowerShell.ConsoleHost\bin\Debug\net451
Start-DevPowerShell -binDir .\src\Microsoft.PowerShell.ConsoleHost\bin\Debug\net451
```
Or more programmatically:
```powershell
Start-DevPSGithub -binDir (Split-Path -Parent (Get-PSOutput))
Start-DevPowerShell -binDir (Split-Path -Parent (Get-PSOutput))
```
The default for `powershell.exe` that **we build** is x86. See
[issue #683][].
There is a separate execution policy registry key for x86, and it's
likely that you didn't ~~bypass~~ enable it. From **powershell.exe
(x86)** run:
```
Set-ExecutionPolicy Bypass
```
[issue #683]: https://github.com/PowerShell/PowerShell/issues/683
The default for produced `powershell.exe` is x64.
You can contorl it with `Start-PSBuild -FullCLR -NativeHostArch x86`
Build manually
==============
@ -104,7 +94,7 @@ Build manually
The build logic is relatively simple and contains the following steps:
- building managed DLLs: `dotnet publish --runtime net451`
- generating Visual Studio project: `cmake -G "$cmakeGenerator"`
- generating Visual Studio project: `cmake`
- building `powershell.exe` from generated solution: `msbuild
powershell.sln`

View file

@ -3,19 +3,14 @@ using System.Collections;
using System.Diagnostics;
using System.Runtime.InteropServices;
using System.Text;
using System.Resources;
using System.Reflection;
namespace Microsoft.PowerShell.Commands.Diagnostics.Common
{
internal class CommonUtilities
internal static class CommonUtilities
{
//
// No-op private ctor to prevent the default ctor from getting generated.
// This class is intended to only have static members.
//
private CommonUtilities() { }
//
// StringArrayToString helper converts a string array into a comma-separated string.
// Note this has only limited use, individual strings cannot have commas.
@ -117,6 +112,12 @@ namespace Microsoft.PowerShell.Commands.Diagnostics.Common
return formatError;
}
public static ResourceManager GetResourceManager()
{
// this naming pattern is dictated by the dotnet cli
return new ResourceManager("Microsoft.PowerShell.Commands.Diagnostics.resources.GetEventResources", typeof(CommonUtilities).GetTypeInfo().Assembly);
}
}
}

View file

@ -145,7 +145,7 @@ namespace Microsoft.PowerShell.Commands.GetCounter
{
internal PerformanceCounterSampleSet()
{
_resourceMgr = new ResourceManager("GetEventResources", Assembly.GetExecutingAssembly());
_resourceMgr = Microsoft.PowerShell.Commands.Diagnostics.Common.CommonUtilities.GetResourceManager();
}
internal PerformanceCounterSampleSet (DateTime timeStamp,

View file

@ -152,7 +152,7 @@ namespace Microsoft.PowerShell.Commands
protected override void BeginProcessing()
{
_resourceMgr = new ResourceManager("GetEventResources", Assembly.GetExecutingAssembly());
_resourceMgr = Microsoft.PowerShell.Commands.Diagnostics.Common.CommonUtilities.GetResourceManager();
//
// Determine the OS version: this cmdlet requires Windows 7

View file

@ -203,7 +203,7 @@ namespace Microsoft.PowerShell.Commands
//
protected override void BeginProcessing()
{
_resourceMgr = new ResourceManager("GetEventResources", Assembly.GetExecutingAssembly());
_resourceMgr = Microsoft.PowerShell.Commands.Diagnostics.Common.CommonUtilities.GetResourceManager();
_pdhHelper = new PdhHelper(System.Environment.OSVersion.Version.Major < 6);
uint res = _pdhHelper.ConnectToDataSource();

View file

@ -396,7 +396,7 @@ namespace Microsoft.PowerShell.Commands
//
protected override void BeginProcessing()
{
_resourceMgr = new ResourceManager("GetEventResources", typeof(GetWinEventCommand).GetTypeInfo().Assembly);
_resourceMgr = Microsoft.PowerShell.Commands.Diagnostics.Common.CommonUtilities.GetResourceManager();
}

View file

@ -189,7 +189,7 @@ namespace Microsoft.PowerShell.Commands
//
protected override void BeginProcessing()
{
_resourceMgr = new ResourceManager("GetEventResources", Assembly.GetExecutingAssembly());
_resourceMgr = Microsoft.PowerShell.Commands.Diagnostics.Common.CommonUtilities.GetResourceManager();
_pdhHelper = new PdhHelper(System.Environment.OSVersion.Version.Major < 6);
}

View file

@ -13,7 +13,7 @@ using System.Diagnostics.CodeAnalysis;
using System.Collections.Generic;
using System.Xml;
using System.IO;
namespace Microsoft.PowerShell.Commands
{
///
@ -28,7 +28,7 @@ namespace Microsoft.PowerShell.Commands
private const string TemplateTag = "template";
private const string DataTag = "data";
private ResourceManager _resourceMgr = new ResourceManager("GetEventResources", typeof(NewWinEventCommand).GetTypeInfo().Assembly);
private ResourceManager _resourceMgr = Microsoft.PowerShell.Commands.Diagnostics.Common.CommonUtilities.GetResourceManager();
/// <summary>

View file

@ -29,8 +29,7 @@
"ExportCounterCommand.cs",
"GetCounterCommand.cs",
"ImportCounterCommand.cs",
"CounterFileInfo.cs",
"CommonUtils.cs"
"CounterFileInfo.cs"
]
}
}

View file

@ -0,0 +1,289 @@
<?xml version="1.0" encoding="utf-8"?>
<root>
<!--
Microsoft ResX Schema
Version 2.0
The primary goals of this format is to allow a simple XML format
that is mostly human readable. The generation and parsing of the
various data types are done through the TypeConverter classes
associated with the data types.
Example:
... ado.net/XML headers & schema ...
<resheader name="resmimetype">text/microsoft-resx</resheader>
<resheader name="version">2.0</resheader>
<resheader name="reader">System.Resources.ResXResourceReader, System.Windows.Forms, ...</resheader>
<resheader name="writer">System.Resources.ResXResourceWriter, System.Windows.Forms, ...</resheader>
<data name="Name1"><value>this is my long string</value><comment>this is a comment</comment></data>
<data name="Color1" type="System.Drawing.Color, System.Drawing">Blue</data>
<data name="Bitmap1" mimetype="application/x-microsoft.net.object.binary.base64">
<value>[base64 mime encoded serialized .NET Framework object]</value>
</data>
<data name="Icon1" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
<value>[base64 mime encoded string representing a byte array form of the .NET Framework object]</value>
<comment>This is a comment</comment>
</data>
There are any number of "resheader" rows that contain simple
name/value pairs.
Each data row contains a name, and value. The row also contains a
type or mimetype. Type corresponds to a .NET class that support
text/value conversion through the TypeConverter architecture.
Classes that don't support this are serialized and stored with the
mimetype set.
The mimetype is used for serialized objects, and tells the
ResXResourceReader how to depersist the object. This is currently not
extensible. For a given mimetype the value must be set accordingly:
Note - application/x-microsoft.net.object.binary.base64 is the format
that the ResXResourceWriter will generate, however the reader can
read any of the formats listed below.
mimetype: application/x-microsoft.net.object.binary.base64
value : The object must be serialized with
: System.Runtime.Serialization.Formatters.Binary.BinaryFormatter
: and then encoded with base64 encoding.
mimetype: application/x-microsoft.net.object.soap.base64
value : The object must be serialized with
: System.Runtime.Serialization.Formatters.Soap.SoapFormatter
: and then encoded with base64 encoding.
mimetype: application/x-microsoft.net.object.bytearray.base64
value : The object must be serialized into a byte array
: using a System.ComponentModel.TypeConverter
: and then encoded with base64 encoding.
-->
<xsd:schema id="root" xmlns="" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata">
<xsd:import namespace="http://www.w3.org/XML/1998/namespace" />
<xsd:element name="root" msdata:IsDataSet="true">
<xsd:complexType>
<xsd:choice maxOccurs="unbounded">
<xsd:element name="metadata">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="value" type="xsd:string" minOccurs="0" />
</xsd:sequence>
<xsd:attribute name="name" use="required" type="xsd:string" />
<xsd:attribute name="type" type="xsd:string" />
<xsd:attribute name="mimetype" type="xsd:string" />
<xsd:attribute ref="xml:space" />
</xsd:complexType>
</xsd:element>
<xsd:element name="assembly">
<xsd:complexType>
<xsd:attribute name="alias" type="xsd:string" />
<xsd:attribute name="name" type="xsd:string" />
</xsd:complexType>
</xsd:element>
<xsd:element name="data">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
<xsd:element name="comment" type="xsd:string" minOccurs="0" msdata:Ordinal="2" />
</xsd:sequence>
<xsd:attribute name="name" type="xsd:string" use="required" msdata:Ordinal="1" />
<xsd:attribute name="type" type="xsd:string" msdata:Ordinal="3" />
<xsd:attribute name="mimetype" type="xsd:string" msdata:Ordinal="4" />
<xsd:attribute ref="xml:space" />
</xsd:complexType>
</xsd:element>
<xsd:element name="resheader">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
</xsd:sequence>
<xsd:attribute name="name" type="xsd:string" use="required" />
</xsd:complexType>
</xsd:element>
</xsd:choice>
</xsd:complexType>
</xsd:element>
</xsd:schema>
<resheader name="resmimetype">
<value>text/microsoft-resx</value>
</resheader>
<resheader name="version">
<value>2.0</value>
</resheader>
<resheader name="reader">
<value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</resheader>
<resheader name="writer">
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</resheader>
<data name="CounterNotALogFile" xml:space="preserve">
<value>The {0} file does not have the expected file name extension. Specify only .blg, .csv, or .tsv files when you use the Path parameter.</value>
</data>
<data name="CounterApiError" xml:space="preserve">
<value>Internal performance counter API call failed. Error: {0:x8}.</value>
</data>
<data name="LogProviderOrPathNeeded" xml:space="preserve">
<value>You must specify at least one Log, Provider or Path key-value pair.</value>
</data>
<data name="NoMatchingProvidersFound" xml:space="preserve">
<value>There is not an event provider on the {0} computer that matches "{1}".</value>
</data>
<data name="NullNotAllowedInHashtable" xml:space="preserve">
<value>A null value was encountered in the {0} hash table key. Null values are not permitted.</value>
</data>
<data name="QueryTrace" xml:space="preserve">
<value>Constructed structured query:
{0}.</value>
</data>
<data name="ProviderLogLink" xml:space="preserve">
<value>The {0} provider writes events to the {1} log.</value>
</data>
<data name="CounterInvalidDateRange" xml:space="preserve">
<value>The value of the StartTime parameter must be less than the value of the EndTime parameter.</value>
</data>
<data name="NoMatchingLogsFound" xml:space="preserve">
<value>There is not an event log on the {0} computer that matches "{1}".</value>
</data>
<data name="Vendor" xml:space="preserve">
<value>Microsoft</value>
</data>
<data name="CounterCircularNoMaxSize" xml:space="preserve">
<value>The Circular parameter will be ignored unless the MaxSize parameter is also specified.</value>
</data>
<data name="FileOpenFailed" xml:space="preserve">
<value>Unable to open the {0} file for writing.</value>
</data>
<data name="KeywordLongExpected" xml:space="preserve">
<value>Invalid value '{0}' specified for keyword.</value>
</data>
<data name="CounterExportSampleNotInInitialSet" xml:space="preserve">
<value>The {0} performance counter cannot be exported to the {1} file because it was not part of the first sample set.</value>
</data>
<data name="NoMatchingEventsFound" xml:space="preserve">
<value>No events were found that match the specified selection criteria.</value>
</data>
<data name="CounterPathTranslationFailed" xml:space="preserve">
<value>The default values for this command failed. Error: {0:x8}.</value>
</data>
<data name="CounterNoMixedLogTypes" xml:space="preserve">
<value>You cannot import different types of performance log files in the same command. Specify only one type of file in the Path parameter.</value>
</data>
<data name="NotAFileSystemPath" xml:space="preserve">
<value>The {0} path does not appear to be a valid log file path. Specify a valid file system path.</value>
</data>
<data name="EventIdNotSpecified" xml:space="preserve">
<value>A valid Event Id must be specified.</value>
</data>
<data name="ProviderMetadataUnavailable" xml:space="preserve">
<value>Could not retrieve information about the {0} provider. Error: {1}.</value>
</data>
<data name="SpecifyOldestForLog" xml:space="preserve">
<value>The {0} event log can be read only in the forward chronological order because it is an analytical or a debug log. To see events from the {0} event log, use the Oldest parameter in the command.</value>
</data>
<data name="ExportDestPathAmbiguous" xml:space="preserve">
<value>The following export destination path is ambiguous: {0}.</value>
</data>
<data name="CounterPathIsInvalid" xml:space="preserve">
<value>The {0} performance counter path is not valid.</value>
</data>
<data name="CounterSampleDataInvalid" xml:space="preserve">
<value>The data in one of the performance counter samples is not valid. View the Status property for each PerformanceCounterSample object to make sure it contains valid data.</value>
</data>
<data name="PayloadMismatch" xml:space="preserve">
<value>Provided payload does not match with the template that was defined for event id {0}.
The defined template is following:
{1}</value>
</data>
<data name="NoMatchingCounterSetsFound" xml:space="preserve">
<value>Cannot find any performance counter sets on the {0} computer that match the following: {1}.</value>
</data>
<data name="CounterPathsInFilesInvalid" xml:space="preserve">
<value>No valid counter paths were found in the files.</value>
</data>
<data name="FileCreateFailed" xml:space="preserve">
<value>Unable to create the {0} file. Verify that the path is valid.</value>
</data>
<data name="NoCounterSetsOnComputer" xml:space="preserve">
<value>Could not find any performance counter sets on the {0} computer: error {1:x8}. Verify that the {0} computer exists, that it is discoverable, and that you have sufficient privileges to view performance counter data on that computer.</value>
</data>
<data name="IncorrectEventId" xml:space="preserve">
<value>Event cannot be written because there are no events defined with id {0} for the provider {1}. Please correct the event id and try again.</value>
</data>
<data name="InvalidContext" xml:space="preserve">
<value>The {0} Context key-value is not a valid SID or NT account name.</value>
</data>
<data name="IncorrectEventVersion" xml:space="preserve">
<value>Event cannot be written because the specified version {0} for event {1} is not defined for the provider {2}. Please correct the version and try again.</value>
</data>
<data name="CounterInvalidFormat" xml:space="preserve">
<value>The {0} format type is not a valid format for a counter file. Possible values for the Format parameter are .blg, .csv, or .tsv.</value>
</data>
<data name="Counter32FileLimit" xml:space="preserve">
<value>You cannot import more than 32 .blg counter log files in each command.</value>
</data>
<data name="SpecifiedProvidersDontWriteToLog" xml:space="preserve">
<value>The specified providers do not write events to the {0} log. This log will be ignored.</value>
</data>
<data name="InvalidSIDFormat" xml:space="preserve">
<value>The following value is not in a valid security identifier (SID) format: {0}. Enter a valid SID, such as S-1-5-32-544.</value>
</data>
<data name="NoProviderFound" xml:space="preserve">
<value>No provider found with name {0}.</value>
</data>
<data name="CounterSetEnumAccessDenied" xml:space="preserve">
<value>Cannot retrieve information about the {0} performance counter set because access was denied.</value>
</data>
<data name="VersionNotSpecified" xml:space="preserve">
<value>Event cannot be written because multiple events with id {0} have beend defined for provider {1}. Please provide a version for the event and try again.</value>
</data>
<data name="SpecifyOldestForEtlEvt" xml:space="preserve">
<value>The {0} event log file can be read only in the forward chronological order because it is an .etl or an .evt file. To see events from the {0} event log, use the Oldest parameter in the command.</value>
</data>
<data name="ProviderNotSpecified" xml:space="preserve">
<value>Provider name must be specified.</value>
</data>
<data name="NotALogFile" xml:space="preserve">
<value>The {0} file does not appear to be a valid log file. Specify only .evtx, .etl, or .evt files as values of the Path parameter.</value>
</data>
<data name="CounterPathInvalidOrNotInFile" xml:space="preserve">
<value>The {0} performance counter path is either not valid or it is not present in the following files: {1}.</value>
</data>
<data name="Timestamp" xml:space="preserve">
<value>Timestamp</value>
</data>
<data name="DateTimeExpected" xml:space="preserve">
<value>The following value is not in a valid DateTime format: {0}.</value>
</data>
<data name="LogInfoUnavailable" xml:space="preserve">
<value>Could not retrieve information about the {0} log. Error: {1}.</value>
</data>
<data name="NoEventMessage" xml:space="preserve">
<value>Cannot retrieve event message text.</value>
</data>
<data name="CounterFileExists" xml:space="preserve">
<value>The {0} file already exists. To overwrite this file, use the Force parameter in the Export-Counter command.</value>
</data>
<data name="CounterContinuousOrMaxSamples" xml:space="preserve">
<value>The Continuous parameter and the MaxSamples parameter cannot be used in the same command.</value>
</data>
<data name="ExportCtrWin7Required" xml:space="preserve">
<value>This cmdlet can be run only on Microsoft Windows 7 and above.</value>
</data>
<data name="Description" xml:space="preserve">
<value>This Windows PowerShell snap-in contains Windows Eventing and Performance Counter cmdlets.</value>
</data>
<data name="NoMatchingCounterSetsInFile" xml:space="preserve">
<value>Cannot find any performance counter sets in the {0} files that match the following: {1}.</value>
</data>
<data name="LogsAndProvidersDontOverlap" xml:space="preserve">
<value>The specified providers do not write events to any of the specified logs.</value>
</data>
<data name="CookedValues" xml:space="preserve">
<value>Cooked Values</value>
</data>
<data name="Counter1FileLimit" xml:space="preserve">
<value>You cannot import more than one comma-separated (.csv) or tab-separated (.tsv) performance counter file in each command.</value>
</data>
</root>

View file

@ -1,12 +0,0 @@
{
"monad/miscfiles/modules/Microsoft.PowerShell.Diagnostics/Microsoft.PowerShell.Diagnostics.psd1": "Microsoft.PowerShell.Diagnostics/Microsoft.PowerShell.Diagnostics.psd1",
"monad/miscfiles/modules/Microsoft.PowerShell.Utility/Microsoft.PowerShell.Utility.psd1": "Microsoft.PowerShell.Utility/Microsoft.PowerShell.Utility.psd1",
"monad/src/ScheduledJob/PSScheduledJob.Format.ps1xml": "PSScheduledJob/PSScheduledJob.Format.ps1xml",
"monad/src/ScheduledJob/PSScheduledJob.psd1": "PSScheduledJob/PSScheduledJob.psd1",
"monad/src/ScheduledJob/PSScheduledJob.types.ps1xml": "PSScheduledJob/PSScheduledJob.types.ps1xml",
"monad/src/m3p/product/PSWorkflow.psd1" : "PSWorkflow/PSWorkflow.psd1",
"monad/src/m3p/product/PSWorkflow.psm1" : "PSWorkflow/PSWorkflow.psm1",
"monad/src/m3p/product/PSWorkflow.types.ps1xml" : "PSWorkflow/PSWorkflow.types.ps1xml",
"monad/src/m3p/product/PSWorkflowUtility.psd1" : "PSWorkflowUtility/PSWorkflowUtility.psd1",
"monad/src/m3p/product/PSWorkflowUtility.psm1" : "PSWorkflowUtility/PSWorkflowUtility.psm1"
}

View file

@ -30,5 +30,5 @@
"monad/src/host/msh/resources/ManagedEntranceStrings.resx": "resources/ManagedEntranceStrings.resx",
"monad/src/singleshell/installer/EngineInstaller.cs": "singleshell/installer/EngineInstaller.cs",
"monad/src/host/msh/ConsoleHostRawUserInterface.cs": "host/msh/ConsoleHostRawUserInterface.cs",
"monad/src/host/msh/ConsoleHost.cs": "host/msh/ConsoleHost.cs",
"monad/src/host/msh/ConsoleHost.cs": "host/msh/ConsoleHost.cs"
}

View file

@ -10,9 +10,18 @@
"warningsAsErrors": true,
"allowUnsafe": true,
"copyToOutput": {
"include": [
"Modules",
"../Modules",
"mappings": {
"Modules/" : {
"include": [
"../Modules/Full",
"../Modules/Shared"
],
"exclude": [
"../Modules/Shared/Pester/.git*"
]
}
},
"include" : [
"powershell.exe",
"../../powershell.version"
]
@ -20,14 +29,20 @@
},
"publishOptions": {
"include": [
"Modules",
"../Modules",
"mappings": {
"Modules/" : {
"include": [
"../Modules/Full",
"../Modules/Shared"
],
"exclude": [
"../Modules/Shared/Pester/.git*"
]
}
},
"include" : [
"powershell.exe",
"../../powershell.version"
],
"exclude": [
"../Modules/Pester/.git"
]
},

25
src/Modules/README.md Normal file
View file

@ -0,0 +1,25 @@
Modules
==========
There are 3 directories with **content** files.
Content files includes:
- ps1xml
- psm1
- psd1
- ps1
These files are copied as-is by `dotnet`
- **Shared** is shared between all flavours
- **Full** for FullCLR (Windows)
- **Core** for CoreCLR (all platforms)
Notes
-----------
* We have files with the same names in "Full" and "Core" folders.
That means that the contents of these two files are different.
I.e. if it's .psd1 file, it could be because `CmdletsToExport` are different for different platforms.
* Also, we should never have files with the same names under "Full" and "Shared" (or "Core" and "Shared").

View file

@ -10,5 +10,6 @@ AliasesToExport = @()
FunctionsToExport = @()
CmdletsToExport="Disable-WSManCredSSP", "Enable-WSManCredSSP", "Get-WSManCredSSP", "Set-WSManQuickConfig", "Test-WSMan", "Invoke-WSManAction", "Connect-WSMan", "Disconnect-WSMan", "Get-WSManInstance", "Set-WSManInstance", "Remove-WSManInstance", "New-WSManInstance", "New-WSManSessionOption"
NestedModules="Microsoft.WSMan.Management.dll"
FormatsToProcess="WSMan.format.ps1xml"
HelpInfoURI = 'http://go.microsoft.com/fwlink/?linkid=390788'
}

View file

@ -1,31 +1,49 @@
{
"monad/miscfiles/modules/PSDiagnostics/PSDiagnostics.psd1": "PSDiagnostics/PSDiagnostics.psd1",
"monad/miscfiles/modules/Microsoft.PowerShell.Archive/Microsoft.PowerShell.Archive.psm1": "Microsoft.PowerShell.Archive/Microsoft.PowerShell.Archive.psm1",
"monad/miscfiles/modules/Microsoft.PowerShell.Management/Microsoft.PowerShell.Management.psd1": "Microsoft.PowerShell.Management/Microsoft.PowerShell.Management.psd1",
"monad/miscfiles/modules/Microsoft.WSMan.Management/Microsoft.WSMan.Management.psd1": "Microsoft.WSMan.Management/Microsoft.WSMan.Management.psd1",
"monad/miscfiles/modules/PSDiagnostics/PSDiagnostics.psm1": "PSDiagnostics/PSDiagnostics.psm1",
"monad/miscfiles/modules/AppxProvider/AppxProvider.psm1": "AppxProvider/AppxProvider.psm1",
"monad/miscfiles/modules/Microsoft.PowerShell.Archive/Microsoft.PowerShell.Archive.psd1": "Microsoft.PowerShell.Archive/Microsoft.PowerShell.Archive.psd1",
"monad/miscfiles/modules/Microsoft.PowerShell.Utility/Microsoft.PowerShell.Utility.psm1": "Microsoft.PowerShell.Utility/Microsoft.PowerShell.Utility.psm1",
"monad/miscfiles/modules/Microsoft.PowerShell.Security/Microsoft.PowerShell.Security.psd1": "Microsoft.PowerShell.Security/Microsoft.PowerShell.Security.psd1",
"monad/miscfiles/modules/Microsoft.PowerShell.Archive/ArchiveResources.psd1": "Microsoft.PowerShell.Archive/ArchiveResources.psd1",
"monad/miscfiles/modules/PSGet/PSGet.psd1": "PowerShellGet/PowerShellGet.psd1",
"monad/miscfiles/modules/PSGet/PSModule.psm1": "PowerShellGet/PSModule.psm1",
"monad/miscfiles/modules/PSGet/PSGet.Format.ps1xml": "PowerShellGet/PSGet.Format.ps1xml",
"monad/miscfiles/modules/PSGet/PSGet.Resource.psd1": "PowerShellGet/PSGet.Resource.psd1",
"monad/miscfiles/modules/Microsoft.PowerShell.Host/Microsoft.PowerShell.Host.psd1": "Microsoft.PowerShell.Host/Microsoft.PowerShell.Host.psd1",
"monad/miscfiles/modules/AppxProvider/AppxProvider.Resource.psd1": "AppxProvider/AppxProvider.Resource.psd1",
"monad/miscfiles/modules/AppxProvider/AppxProvider.psd1": "AppxProvider/AppxProvider.psd1",
"monad/src/LocalAccounts/Microsoft.PowerShell.LocalAccounts.psd1": "Microsoft.PowerShell.LocalAccounts/Microsoft.PowerShell.LocalAccounts.psd1",
"monad/src/LocalAccounts/LocalAccounts.format.ps1xml": "Microsoft.PowerShell.LocalAccounts/LocalAccounts.format.ps1xml",
"monad/src/oneget/PowerShell.Module/PackageManagement.psd1": "PackageManagement/PackageManagement.psd1",
"monad/src/oneget/PowerShell.Module/PackageManagement.format.ps1xml": "PackageManagement/PackageManagement.format.ps1xml",
"monad/src/oneget/providers/inbox/powershell.metaprovider/PackageProviderFunctions.psm1": "PackageManagement/PackageProviderFunctions.psm1",
"wmi/psws/PSODataUtils/Microsoft.PowerShell.ODataUtils/Microsoft.PowerShell.ODataAdapter.ps1": "Microsoft.PowerShell.ODataUtils/Microsoft.PowerShell.ODataAdapter.ps1",
"wmi/psws/PSODataUtils/Microsoft.PowerShell.ODataUtils/Microsoft.PowerShell.ODataUtils.psd1": "Microsoft.PowerShell.ODataUtils/Microsoft.PowerShell.ODataUtils.psd1",
"wmi/psws/PSODataUtils/Microsoft.PowerShell.ODataUtils/Microsoft.PowerShell.ODataUtils.psm1": "Microsoft.PowerShell.ODataUtils/Microsoft.PowerShell.ODataUtils.psm1",
"wmi/psws/PSODataUtils/Microsoft.PowerShell.ODataUtils/Microsoft.PowerShell.ODataUtilsHelper.ps1": "Microsoft.PowerShell.ODataUtils/Microsoft.PowerShell.ODataUtilsHelper.ps1",
"wmi/psws/PSODataUtils/Microsoft.PowerShell.ODataUtils/Microsoft.PowerShell.ODataV4Adapter.ps1": "Microsoft.PowerShell.ODataUtils/Microsoft.PowerShell.ODataV4Adapter.ps1",
"wmi/psws/PSODataUtils/Microsoft.PowerShell.ODataUtils/Microsoft.PowerShell.ODataUtilsStrings.psd1": "Microsoft.PowerShell.ODataUtils/en-US/Microsoft.PowerShell.ODataUtilsStrings.psd1",
"wmi/WMIv2/Client/CIMCmdlets/CimCmdlets.psd1" : "CimCmdlets/CimCmdlets.psd1"
"monad/miscfiles/modules/PSDiagnostics/PSDiagnostics.psd1": "Shared/PSDiagnostics/PSDiagnostics.psd1",
"monad/miscfiles/modules/Microsoft.PowerShell.Archive/Microsoft.PowerShell.Archive.psm1": "Shared/Microsoft.PowerShell.Archive/Microsoft.PowerShell.Archive.psm1",
"monad/miscfiles/modules/Microsoft.PowerShell.Management/Microsoft.PowerShell.Management.psd1": "Shared/Microsoft.PowerShell.Management/Microsoft.PowerShell.Management.psd1",
"monad/miscfiles/modules/Microsoft.WSMan.Management/Microsoft.WSMan.Management.psd1": "Shared/Microsoft.WSMan.Management/Microsoft.WSMan.Management.psd1",
"monad/miscfiles/display/WSMan.format.ps1xml": "Shared/Microsoft.WSMan.Management/WSMan.format.ps1xml",
"monad/miscfiles/modules/PSDiagnostics/PSDiagnostics.psm1": "Shared/PSDiagnostics/PSDiagnostics.psm1",
"monad/miscfiles/modules/AppxProvider/AppxProvider.psm1": "Shared/AppxProvider/AppxProvider.psm1",
"monad/miscfiles/modules/Microsoft.PowerShell.Archive/Microsoft.PowerShell.Archive.psd1": "Shared/Microsoft.PowerShell.Archive/Microsoft.PowerShell.Archive.psd1",
"monad/miscfiles/modules/Microsoft.PowerShell.Utility/Microsoft.PowerShell.Utility.psm1": "Shared/Microsoft.PowerShell.Utility/Microsoft.PowerShell.Utility.psm1",
"monad/miscfiles/modules/Microsoft.PowerShell.Security/Microsoft.PowerShell.Security.psd1": "Shared/Microsoft.PowerShell.Security/Microsoft.PowerShell.Security.psd1",
"monad/miscfiles/modules/Microsoft.PowerShell.Archive/ArchiveResources.psd1": "Shared/Microsoft.PowerShell.Archive/ArchiveResources.psd1",
"monad/miscfiles/modules/PSGet/PSGet.psd1": "Shared/PowerShellGet/PowerShellGet.psd1",
"monad/miscfiles/modules/PSGet/PSModule.psm1": "Shared/PowerShellGet/PSModule.psm1",
"monad/miscfiles/modules/PSGet/PSGet.Format.ps1xml": "Shared/PowerShellGet/PSGet.Format.ps1xml",
"monad/miscfiles/modules/PSGet/PSGet.Resource.psd1": "Shared/PowerShellGet/PSGet.Resource.psd1",
"monad/miscfiles/modules/Microsoft.PowerShell.Host/Microsoft.PowerShell.Host.psd1": "Shared/Microsoft.PowerShell.Host/Microsoft.PowerShell.Host.psd1",
"monad/miscfiles/modules/AppxProvider/AppxProvider.Resource.psd1": "Shared/AppxProvider/AppxProvider.Resource.psd1",
"monad/miscfiles/modules/AppxProvider/AppxProvider.psd1": "Shared/AppxProvider/AppxProvider.psd1",
"monad/src/LocalAccounts/Microsoft.PowerShell.LocalAccounts.psd1": "Shared/Microsoft.PowerShell.LocalAccounts/Microsoft.PowerShell.LocalAccounts.psd1",
"monad/src/LocalAccounts/LocalAccounts.format.ps1xml": "Shared/Microsoft.PowerShell.LocalAccounts/LocalAccounts.format.ps1xml",
"monad/src/oneget/PowerShell.Module/PackageManagement.psd1": "Shared/PackageManagement/PackageManagement.psd1",
"monad/src/oneget/PowerShell.Module/PackageManagement.format.ps1xml": "Shared/PackageManagement/PackageManagement.format.ps1xml",
"monad/src/oneget/providers/inbox/powershell.metaprovider/PackageProviderFunctions.psm1": "Shared/PackageManagement/PackageProviderFunctions.psm1",
"wmi/psws/PSODataUtils/Microsoft.PowerShell.ODataUtils/Microsoft.PowerShell.ODataAdapter.ps1": "Shared/Microsoft.PowerShell.ODataUtils/Microsoft.PowerShell.ODataAdapter.ps1",
"wmi/psws/PSODataUtils/Microsoft.PowerShell.ODataUtils/Microsoft.PowerShell.ODataUtils.psd1": "Shared/Microsoft.PowerShell.ODataUtils/Microsoft.PowerShell.ODataUtils.psd1",
"wmi/psws/PSODataUtils/Microsoft.PowerShell.ODataUtils/Microsoft.PowerShell.ODataUtils.psm1": "Shared/Microsoft.PowerShell.ODataUtils/Microsoft.PowerShell.ODataUtils.psm1",
"wmi/psws/PSODataUtils/Microsoft.PowerShell.ODataUtils/Microsoft.PowerShell.ODataUtilsHelper.ps1": "Shared/Microsoft.PowerShell.ODataUtils/Microsoft.PowerShell.ODataUtilsHelper.ps1",
"wmi/psws/PSODataUtils/Microsoft.PowerShell.ODataUtils/Microsoft.PowerShell.ODataV4Adapter.ps1": "Shared/Microsoft.PowerShell.ODataUtils/Microsoft.PowerShell.ODataV4Adapter.ps1",
"wmi/psws/PSODataUtils/Microsoft.PowerShell.ODataUtils/Microsoft.PowerShell.ODataUtilsStrings.psd1": "Shared/Microsoft.PowerShell.ODataUtils/en-US/Microsoft.PowerShell.ODataUtilsStrings.psd1",
"wmi/WMIv2/Client/CIMCmdlets/CimCmdlets.psd1": "Shared/CimCmdlets/CimCmdlets.psd1",
"monad/miscfiles/modules/Microsoft.PowerShell.Diagnostics/Microsoft.PowerShell.Diagnostics.psd1": "Full/Microsoft.PowerShell.Diagnostics/Microsoft.PowerShell.Diagnostics.psd1",
"monad/miscfiles/types/getevent.types.ps1xml": "Full/Microsoft.PowerShell.Diagnostics/GetEvent.types.ps1xml",
"monad/miscfiles/display/Event.format.ps1xml": "Full/Microsoft.PowerShell.Diagnostics/Event.format.ps1xml",
"monad/miscfiles/display/Diagnostics.format.ps1xml": "Full/Microsoft.PowerShell.Diagnostics/Diagnostics.format.ps1xml",
"monad/miscfiles/modules/Microsoft.PowerShell.Utility/Microsoft.PowerShell.Utility.psd1": "Full/Microsoft.PowerShell.Utility/Microsoft.PowerShell.Utility.psd1",
"monad/src/ScheduledJob/PSScheduledJob.Format.ps1xml": "Full/PSScheduledJob/PSScheduledJob.Format.ps1xml",
"monad/src/ScheduledJob/PSScheduledJob.psd1": "Full/PSScheduledJob/PSScheduledJob.psd1",
"monad/src/ScheduledJob/PSScheduledJob.types.ps1xml": "Full/PSScheduledJob/PSScheduledJob.types.ps1xml",
"monad/src/m3p/product/PSWorkflow.psd1": "Full/PSWorkflow/PSWorkflow.psd1",
"monad/src/m3p/product/PSWorkflow.psm1": "Full/PSWorkflow/PSWorkflow.psm1",
"monad/src/m3p/product/PSWorkflow.types.ps1xml": "Full/PSWorkflow/PSWorkflow.types.ps1xml",
"monad/src/m3p/product/PSWorkflowUtility.psd1": "Full/PSWorkflowUtility/PSWorkflowUtility.psd1",
"monad/src/m3p/product/PSWorkflowUtility.psm1": "Full/PSWorkflowUtility/PSWorkflowUtility.psm1",
"monad/miscfiles/modules/Microsoft.PowerShell.Diagnostics/CoreClr/Microsoft.PowerShell.Diagnostics.psd1": "Core/Microsoft.PowerShell.Diagnostics/Microsoft.PowerShell.Diagnostics.psd1",
"monad/miscfiles/modules/Microsoft.PowerShell.Utility/CoreClr/Microsoft.PowerShell.Utility.psd1": "Core/Microsoft.PowerShell.Utility/Microsoft.PowerShell.Utility.psd1"
}

View file

@ -1,4 +0,0 @@
{
"monad/miscfiles/modules/Microsoft.PowerShell.Diagnostics/CoreClr/Microsoft.PowerShell.Diagnostics.psd1": "Modules/Microsoft.PowerShell.Diagnostics/Microsoft.PowerShell.Diagnostics.psd1",
"monad/miscfiles/modules/Microsoft.PowerShell.Utility/CoreClr/Microsoft.PowerShell.Utility.psd1": "Modules/Microsoft.PowerShell.Utility/Microsoft.PowerShell.Utility.psd1"
}

View file

@ -8,9 +8,18 @@
"allowUnsafe": true,
"emitEntryPoint": true,
"copyToOutput": {
"mappings": {
"Modules/" : {
"include": [
"../Modules/Core",
"../Modules/Shared"
],
"exclude": [
"../Modules/Shared/Pester/.git*"
]
}
},
"include": [
"Modules",
"../Modules",
"*.so",
"*.dylib",
"../../powershell.version"
@ -19,16 +28,22 @@
},
"publishOptions": {
"mappings": {
"Modules/" : {
"include": [
"../Modules/Core",
"../Modules/Shared"
],
"exclude": [
"../Modules/Shared/Pester/.git*"
]
}
},
"include": [
"Modules",
"../Modules",
"*.so",
"*.dylib",
"../../powershell.version"
],
"exclude": [
"../Modules/Pester/.git"
]
},
"dependencies": {

View file

@ -115,13 +115,27 @@ try
try
{
Import-Module CimCmdlets -ErrorAction Stop
Get-CimClass | Should Not Be $null
Get-CimClass -ClassName CIM_Error | Should Not Be $null
}
finally
{
Remove-Module -ErrorAction SilentlyContinue CimCmdlets
}
}
It 'loads Microsoft.PowerShell.Diagnostics' {
try
{
Import-Module Microsoft.PowerShell.Diagnostics -ErrorAction Stop
Get-WinEvent -LogName System -MaxEvents 1 | Should Not Be $null
[Microsoft.PowerShell.Commands.GetWinEventCommand].Assembly.Location | Should Be (
Join-Path $env:DEVPATH Microsoft.PowerShell.Commands.Diagnostics.dll)
}
finally
{
Remove-Module -ErrorAction SilentlyContinue Microsoft.PowerShell.Diagnostics
}
}
}
}

View file

@ -0,0 +1,7 @@
Describe 'Get-WinEvent' {
# Get-WinEvent works only on windows
It 'can query a System log' -Skip:(-not $IsWindows) {
Get-WinEvent -LogName System -MaxEvents 1 | Should Not Be $null
}
}