From 7a1c81e1f46cb579307c415ecb52bab6fb29a5d1 Mon Sep 17 00:00:00 2001 From: Dongbo Wang Date: Mon, 11 Jul 2016 11:25:21 -0700 Subject: [PATCH] Update and clean up module files in Core/Full/Shared folders --- .../Microsoft.PowerShell.Management.psd1 | 39 +- .../Microsoft.PowerShell.Security.psd1 | 3 +- .../Microsoft.PowerShell.Utility.psm1 | 580 ------------------ .../Core/PSDiagnostics/PSDiagnostics.psd1 | Bin 1214 -> 0 bytes .../Core/PSDiagnostics/PSDiagnostics.psm1 | Bin 23122 -> 0 bytes .../Microsoft.PowerShell.Management.psd1 | 204 +++--- .../Microsoft.PowerShell.Security.psd1 | 28 +- src/Modules/map.json | 7 +- 8 files changed, 125 insertions(+), 736 deletions(-) delete mode 100644 src/Modules/Core/Microsoft.PowerShell.Utility/Microsoft.PowerShell.Utility.psm1 delete mode 100644 src/Modules/Core/PSDiagnostics/PSDiagnostics.psd1 delete mode 100644 src/Modules/Core/PSDiagnostics/PSDiagnostics.psm1 rename src/Modules/{Shared => Full}/Microsoft.PowerShell.Management/Microsoft.PowerShell.Management.psd1 (95%) rename src/Modules/{Shared => Full}/Microsoft.PowerShell.Security/Microsoft.PowerShell.Security.psd1 (98%) diff --git a/src/Modules/Core/Microsoft.PowerShell.Management/Microsoft.PowerShell.Management.psd1 b/src/Modules/Core/Microsoft.PowerShell.Management/Microsoft.PowerShell.Management.psd1 index 425e64b78b..11aff65840 100644 --- a/src/Modules/Core/Microsoft.PowerShell.Management/Microsoft.PowerShell.Management.psd1 +++ b/src/Modules/Core/Microsoft.PowerShell.Management/Microsoft.PowerShell.Management.psd1 @@ -5,10 +5,9 @@ CompanyName="Microsoft Corporation" Copyright="© Microsoft Corporation. All rights reserved." ModuleVersion="3.1.0.0" PowerShellVersion="3.0" -CLRVersion="4.0" NestedModules="Microsoft.PowerShell.Commands.Management.dll" HelpInfoURI = 'http://go.microsoft.com/fwlink/?linkid=390785' -AliasesToExport = @("gcb", "scb") +AliasesToExport = @("gin", "gtz", "stz") FunctionsToExport = @() CmdletsToExport=@("Add-Content", "Clear-Content", @@ -16,19 +15,10 @@ CmdletsToExport=@("Add-Content", "Join-Path", "Convert-Path", "Copy-ItemProperty", - "Get-EventLog", - "Clear-EventLog", - "Write-EventLog", - "Limit-EventLog", - "Show-EventLog", - "New-EventLog", - "Remove-EventLog", "Get-ChildItem", "Get-Content", "Get-ItemProperty", "Get-ItemPropertyValue", - "Get-WmiObject", - "Invoke-WmiMethod", "Move-ItemProperty", "Get-Location", "Set-Location", @@ -56,9 +46,7 @@ CmdletsToExport=@("Add-Content", "Debug-Process", "Start-Process", "Remove-ItemProperty", - "Remove-WmiObject", "Rename-ItemProperty", - "Register-WmiEvent", "Resolve-Path", "Get-Service", "Stop-Service", @@ -70,30 +58,11 @@ CmdletsToExport=@("Add-Content", "New-Service", "Set-Content", "Set-ItemProperty", - "Set-WmiInstance", - "Get-Transaction", - "Start-Transaction", - "Complete-Transaction", - "Undo-Transaction", - "Use-Transaction", - "New-WebServiceProxy", - "Get-HotFix", "Test-Connection", - "Enable-ComputerRestore", - "Disable-ComputerRestore", - "Checkpoint-Computer", - "Get-ComputerRestorePoint", "Restart-Computer", "Stop-Computer", - "Restore-Computer", - "Add-Computer", - "Remove-Computer", - "Test-ComputerSecureChannel", - "Reset-ComputerMachinePassword", "Rename-Computer", - "Get-ControlPanelItem", - "Show-ControlPanelItem", - "Clear-Recyclebin", - "Get-Clipboard", - "Set-Clipboard") + "Get-ComputerInfo", + "Get-TimeZone", + "Set-TimeZone") } diff --git a/src/Modules/Core/Microsoft.PowerShell.Security/Microsoft.PowerShell.Security.psd1 b/src/Modules/Core/Microsoft.PowerShell.Security/Microsoft.PowerShell.Security.psd1 index a0198eea53..26a1ca6ee8 100644 --- a/src/Modules/Core/Microsoft.PowerShell.Security/Microsoft.PowerShell.Security.psd1 +++ b/src/Modules/Core/Microsoft.PowerShell.Security/Microsoft.PowerShell.Security.psd1 @@ -5,10 +5,9 @@ CompanyName="Microsoft Corporation" Copyright="© Microsoft Corporation. All rights reserved." ModuleVersion="3.0.0.0" PowerShellVersion="3.0" -CLRVersion="4.0" AliasesToExport = @() FunctionsToExport = @() -CmdletsToExport="Get-Acl", "Set-Acl", "Get-PfxCertificate", "Get-Credential", "Get-ExecutionPolicy", "Set-ExecutionPolicy", "Get-AuthenticodeSignature", "Set-AuthenticodeSignature", "ConvertFrom-SecureString", "ConvertTo-SecureString", "Get-CmsMessage", "Unprotect-CmsMessage", "Protect-CmsMessage" +CmdletsToExport="Get-Acl", "Set-Acl", "Get-Credential", "Get-ExecutionPolicy", "Set-ExecutionPolicy", "Get-AuthenticodeSignature", "Set-AuthenticodeSignature", "ConvertFrom-SecureString", "ConvertTo-SecureString", "New-FileCatalog" , "Test-FileCatalog" NestedModules="Microsoft.PowerShell.Security.dll" HelpInfoURI = 'http://go.microsoft.com/fwlink/?linkid=390786' } diff --git a/src/Modules/Core/Microsoft.PowerShell.Utility/Microsoft.PowerShell.Utility.psm1 b/src/Modules/Core/Microsoft.PowerShell.Utility/Microsoft.PowerShell.Utility.psm1 deleted file mode 100644 index 79f16b047b..0000000000 --- a/src/Modules/Core/Microsoft.PowerShell.Utility/Microsoft.PowerShell.Utility.psm1 +++ /dev/null @@ -1,580 +0,0 @@ -function Get-FileHash -{ - [CmdletBinding(DefaultParameterSetName = "Path", HelpURI = "http://go.microsoft.com/fwlink/?LinkId=517145")] - param( - [Parameter(Mandatory, ParameterSetName="Path", Position = 0)] - [System.String[]] - $Path, - - [Parameter(Mandatory, ParameterSetName="LiteralPath", ValueFromPipelineByPropertyName = $true)] - [Alias("PSPath")] - [System.String[]] - $LiteralPath, - - [Parameter(Mandatory, ParameterSetName="Stream")] - [System.IO.Stream] - $InputStream, - - [ValidateSet("SHA1", "SHA256", "SHA384", "SHA512", "MACTripleDES", "MD5", "RIPEMD160")] - [System.String] - $Algorithm="SHA256" - ) - - begin - { - # Construct the strongly-typed crypto object - - # First see if it has a FIPS algorithm - $hasherType = "System.Security.Cryptography.${Algorithm}CryptoServiceProvider" -as [Type] - if ($hasherType) - { - $hasher = $hasherType::New() - } - else - { - # Check if the type is supported in the current system - $algorithmType = "System.Security.Cryptography.${Algorithm}" -as [Type] - if ($algorithmType) - { - if ($Algorithm -eq "MACTripleDES") - { - $hasher = $algorithmType::New() - } - else - { - $hasher = $algorithmType::Create() - } - } - else - { - $errorId = "AlgorithmTypeNotSupported" - $errorCategory = [System.Management.Automation.ErrorCategory]::InvalidArgument - $errorMessage = [Microsoft.PowerShell.Commands.UtilityResources]::AlgorithmTypeNotSupported -f $Algorithm - $exception = [System.InvalidOperationException]::New($errorMessage) - $errorRecord = [System.Management.Automation.ErrorRecord]::New($exception, $errorId, $errorCategory, $null) - $PSCmdlet.ThrowTerminatingError($errorRecord) - } - } - - function GetStreamHash - { - param( - [System.IO.Stream] - $InputStream, - - [System.String] - $RelatedPath, - - [System.Security.Cryptography.HashAlgorithm] - $Hasher) - - # Compute file-hash using the crypto object - [Byte[]] $computedHash = $Hasher.ComputeHash($InputStream) - [string] $hash = [BitConverter]::ToString($computedHash) -replace '-','' - - if ($RelatedPath -eq $null) - { - $retVal = [PSCustomObject] @{ - Algorithm = $Algorithm.ToUpperInvariant() - Hash = $hash - } - } - else - { - $retVal = [PSCustomObject] @{ - Algorithm = $Algorithm.ToUpperInvariant() - Hash = $hash - Path = $RelatedPath - } - } - $retVal.psobject.TypeNames.Insert(0, "Microsoft.Powershell.Utility.FileHash") - $retVal - } - } - - process - { - if($PSCmdlet.ParameterSetName -eq "Stream") - { - GetStreamHash -InputStream $InputStream -RelatedPath $null -Hasher $hasher - } - else - { - $pathsToProcess = @() - if($PSCmdlet.ParameterSetName -eq "LiteralPath") - { - $pathsToProcess += Resolve-Path -LiteralPath $LiteralPath | Foreach-Object ProviderPath - } - if($PSCmdlet.ParameterSetName -eq "Path") - { - $pathsToProcess += Resolve-Path $Path | Foreach-Object ProviderPath - } - - foreach($filePath in $pathsToProcess) - { - if(Test-Path -LiteralPath $filePath -PathType Container) - { - continue - } - - try - { - # Read the file specified in $FilePath as a Byte array - [system.io.stream]$stream = [system.io.file]::OpenRead($filePath) - GetStreamHash -InputStream $stream -RelatedPath $filePath -Hasher $hasher - } - catch [Exception] - { - $errorMessage = [Microsoft.PowerShell.Commands.UtilityResources]::FileReadError -f $FilePath, $_ - Write-Error -Message $errorMessage -Category ReadError -ErrorId "FileReadError" -TargetObject $FilePath - return - } - finally - { - if($stream) - { - $stream.Dispose() - } - } - } - } - } -} - -<# This cmdlet is used to create a new temporary file in $env:temp #> -function New-TemporaryFile -{ - [CmdletBinding( - HelpURI='http://go.microsoft.com/fwlink/?LinkId=526726', - SupportsShouldProcess=$true)] - [OutputType([System.IO.FileInfo])] - Param() - - Begin - { - try - { - if($PSCmdlet.ShouldProcess($env:TEMP)) - { - $tempFilePath = [System.IO.Path]::GetTempFileName() - } - } - catch - { - $errorRecord = [System.Management.Automation.ErrorRecord]::new($_.Exception,"NewTemporaryFileWriteError", "WriteError", $env:TEMP) - Write-Error -ErrorRecord $errorRecord - return - } - - if($tempFilePath) - { - Get-Item $tempFilePath - } - } -} - -<# This cmdlet is used to generate a new guid #> -function New-Guid -{ - [CmdletBinding(HelpURI='http://go.microsoft.com/fwlink/?LinkId=526920')] - [OutputType([System.Guid])] - Param() - - Begin - { - [Guid]::NewGuid() - } -} - -<############################################################################################ -# Format-Hex cmdlet helps in displaying the Hexadecimal equivalent of the input data. -############################################################################################> -function Format-Hex -{ - [CmdletBinding( - DefaultParameterSetName="Path", - HelpUri="http://go.microsoft.com/fwlink/?LinkId=526919")] - [Alias("fhx")] - [OutputType("Microsoft.PowerShell.Commands.ByteCollection")] - param - ( - [Parameter (Mandatory=$true, Position=0, ParameterSetName="Path")] - [ValidateNotNullOrEmpty()] - [string[]] $Path, - - [Parameter (Mandatory=$true, ParameterSetName="LiteralPath")] - [ValidateNotNullOrEmpty()] - [Alias("PSPath")] - [string[]] $LiteralPath, - - [Parameter(Mandatory=$true, ParameterSetName="ByInputObject", ValueFromPipeline=$true)] - [Object] $InputObject, - - [Parameter (ParameterSetName="ByInputObject")] - [ValidateSet("Ascii", "UTF32", "UTF7", "UTF8", "BigEndianUnicode", "Unicode")] - [string] $Encoding = "Ascii" - ) - - begin - { - <############################################################################################ - # The ConvertToHexadecimalHelper is a helper method used to fetch unicode bytes from the - # input data and display the hexadecimial representaion of the of the input data in bytes. - ############################################################################################> - function ConvertToHexadecimalHelper - { - param - ( - [Byte[]] $inputBytes, - [string] $path, - [Uint32] $offset - ) - - # This section is used to display the hexadecimal - # representaion of the of the input data in bytes. - if($inputBytes -ne $null) - { - $byteCollectionObject = [Microsoft.PowerShell.Commands.ByteCollection]::new($offset, $inputBytes, $path) - Write-Output -InputObject $byteCollectionObject - } - } - - <############################################################################################ - # The ProcessFileContent is a helper method used to fetch file contents in blocks and - # process it to support displaying hexadecimal formating of the fetched content. - ############################################################################################> - function ProcessFileContent - { - param - ( - [string] $filePath, - [boolean] $isLiteralPath - ) - - if($isLiteralPath) - { - $resolvedPaths = Resolve-Path -LiteralPath $filePath - } - else - { - $resolvedPaths = Resolve-Path -Path $filePath - } - - # If Path resolution has failed then a corresponding non-terminating error is - # written to the pipeline. We continue processing any remaining files. - if($resolvedPaths -eq $null) - { - return - } - - if($resolvedPaths.Count -gt 1) - { - # write a non-terminating error message indicating that path specified is resolving to multiple file system paths. - $errorMessage = [Microsoft.PowerShell.Commands.UtilityResources]::FormatHexResolvePathError -f $filePath - Write-Error -Message $errorMessage -Category ([System.Management.Automation.ErrorCategory]::InvalidData) -ErrorId "FormatHexResolvePathError" - } - - $targetFilePath = $resolvedPaths.ProviderPath - - - if($targetFilePath -ne $null) - { - $bufferSize = 16 - $buffer = [byte[]]::new($bufferSize) - - try - { - try - { - $currentFileStream = [System.IO.File]::Open($targetFilePath, [System.IO.FileMode]::Open, [System.IO.FileAccess]::Read) - } - catch - { - # Failed to access the file. Write a non terminating error to the pipeline - # and move on with the remaining files. - $exception = $_.Exception - if($null -ne $_.Exception -and - $null -ne $_.Exception.InnerException) - { - $exception = $_.Exception.InnerException - } - - $errorRecord = [System.Management.Automation.ErrorRecord]::new($exception,"FormatHexFileAccessError", ([System.Management.Automation.ErrorCategory]::ReadError), $targetFilePath) - $PSCmdlet.WriteError($errorRecord) - } - - if($null -ne $currentFileStream) - { - $srcStream = [System.IO.BinaryReader]::new($currentFileStream) - $displayHeader = $true - $offset = 0 - $blockCounter = 0 - while($numberOfBytesRead = $srcStream.Read($buffer, 0, $bufferSize)) - { - ConvertToHexadecimalHelper $buffer $targetFilePath $offset - $displayHeader = $false - $blockCounter++; - - # Updating the offset value. - $offset = $blockCounter*0x10 - } - } - } - finally - { - If($null -ne $currentFileStream) - { - $currentFileStream.Dispose() - } - If($null -ne $srcStream) - { - $srcStream.Dispose() - } - } - } - } - } - - process - { - switch($PSCmdlet.ParameterSetName) - { - "Path" - { - ProcessFileContent $Path $false - } - "LiteralPath" - { - ProcessFileContent $LiteralPath $true - } - "ByInputObject" - { - # If it's an actual byte or a byte array, then we directly use it for hexadecimal formatting. - if(($InputObject -is [Byte[]]) -or $InputObject -is [Byte]) - { - ConvertToHexadecimalHelper $InputObject $null - } - # If the input data is of string type then directly get bytes out of it. - elseif($InputObject -is [string]) - { - # The ValidateSet arribute on the Encoding paramter makes sure that only - # valid values (supported on all paltforms where Format-Hex is avaliable) - # are allowed through user input. - $inputBytes = [Text.Encoding]::$Encoding.GetBytes($InputObject) - ConvertToHexadecimalHelper $inputBytes $null - } - elseif($InputObject -is [System.IO.FileSystemInfo]) - { - # If file path is provided as an input, use the file contents to show the hexadecimal format. - $filePath = ([System.IO.FileSystemInfo]$InputObject).FullName - ProcessFileContent $filePath $false - } - else - { - # Otherwise, write a non-terminating error message indicating that input object type is not supported. - $errorMessage = [Microsoft.PowerShell.Commands.UtilityResources]::FormatHexTypeNotSupported -f $InputObject.GetType() - Write-Error -Message $errorMessage -Category ([System.Management.Automation.ErrorCategory]::ParserError) -ErrorId "FormatHexFailureTypeNotSupported" - } - } - } - } -} - -## Imports a PowerShell Data File - a PowerShell hashtable defined in -## a file (such as a Module manifest, session configuration file) -function Import-PowerShellDataFile -{ - [CmdletBinding(DefaultParameterSetName = "ByPath", HelpUri = "http://go.microsoft.com/fwlink/?LinkID=623621")] - [OutputType("System.Collections.Hashtable")] - param( - [Parameter(ParameterSetName = "ByPath", Position = 0)] - [String[]] $Path, - - [Parameter(ParameterSetName = "ByLiteralPath", ValueFromPipelineByPropertyName = $true)] - [Alias("PSPath")] - [String[]] $LiteralPath - ) - - begin - { - function ThrowInvalidDataFile - { - param($resolvedPath, $extraError) - - $errorId = "CouldNotParseAsPowerShellDataFile$extraError" - $errorCategory = [System.Management.Automation.ErrorCategory]::InvalidData - $errorMessage = [Microsoft.PowerShell.Commands.UtilityResources]::CouldNotParseAsPowerShellDataFile -f $resolvedPath - $exception = [System.InvalidOperationException]::New($errorMessage) - $errorRecord = [System.Management.Automation.ErrorRecord]::New($exception, $errorId, $errorCategory, $null) - $PSCmdlet.WriteError($errorRecord) - } - } - - process - { - foreach($resolvedPath in (Resolve-Path @PSBoundParameters)) - { - $parseErrors = $null - $ast = [System.Management.Automation.Language.Parser]::ParseFile(($resolvedPath.ProviderPath), [ref] $null, [ref] $parseErrors) - if ($parseErrors.Length -gt 0) - { - ThrowInvalidDataFile $resolvedPath - } - else - { - $data = $ast.Find( { $args[0] -is [System.Management.Automation.Language.HashtableAst] }, $false ) - if($data) - { - $data.SafeGetValue() - } - else - { - ThrowInvalidDataFile $resolvedPath "NoHashtableRoot" - } - } - } - } -} - -## Converts a SDDL string into an object-based representation of a security -## descriptor -function ConvertFrom-SddlString -{ - [CmdletBinding(HelpUri = "http://go.microsoft.com/fwlink/?LinkId=623636")] - param( - ## The string representing the security descriptor in SDDL syntax - [Parameter(Mandatory, Position = 0)] - [String] $Sddl, - - ## The type of rights that this SDDL string represents, if any. - [Parameter()] - [ValidateSet( - "FileSystemRights", "RegistryRights", "ActiveDirectoryRights", - "MutexRights", "SemaphoreRights", "CryptoKeyRights", - "EventWaitHandleRights")] - $Type - ) - - ## Translates a SID into a NT Account - function ConvertTo-NtAccount - { - param($Sid) - - if($Sid) - { - $securityIdentifier = [System.Security.Principal.SecurityIdentifier] $Sid - - try - { - $ntAccount = $securityIdentifier.Translate([System.Security.Principal.NTAccount]).ToString() - } - catch{} - - $ntAccount - } - } - - ## Gets the access rights that apply to an access mask, preferring right types - ## of 'Type' if specified. - function Get-AccessRights - { - param($AccessMask, $Type) - - ## All the types of access rights understood by .NET - $rightTypes = [Ordered] @{ - "FileSystemRights" = [System.Security.AccessControl.FileSystemRights] - "RegistryRights" = [System.Security.AccessControl.RegistryRights] - "ActiveDirectoryRights" = [System.DirectoryServices.ActiveDirectoryRights] - "MutexRights" = [System.Security.AccessControl.MutexRights] - "SemaphoreRights" = [System.Security.AccessControl.SemaphoreRights] - "CryptoKeyRights" = [System.Security.AccessControl.CryptoKeyRights] - "EventWaitHandleRights" = [System.Security.AccessControl.EventWaitHandleRights] - } - $typesToExamine = $rightTypes.Values - - ## If they know the access mask represents a certain type, prefer its names - ## (i.e.: CreateLink for the registry over CreateDirectories for the filesystem) - if($Type) - { - $typesToExamine = @($rightTypes[$Type]) + $typesToExamine - } - - - ## Stores the access types we've found that apply - $foundAccess = @() - - ## Store the access types we've already seen, so that we don't report access - ## flags that are essentially duplicate. Many of the access values in the different - ## enumerations have the same value but with different names. - $foundValues = @{} - - ## Go through the entries in the different right types, and see if they apply to the - ## provided access mask. If they do, then add that to the result. - foreach($rightType in $typesToExamine) - { - foreach($accessFlag in [Enum]::GetNames($rightType)) - { - $longKeyValue = [long] $rightType::$accessFlag - if(-not $foundValues.ContainsKey($longKeyValue)) - { - $foundValues[$longKeyValue] = $true - if(($AccessMask -band $longKeyValue) -eq ($longKeyValue)) - { - $foundAccess += $accessFlag - } - } - } - } - - $foundAccess | Sort-Object - } - - ## Converts an ACE into a string representation - function ConvertTo-AceString - { - param( - [Parameter(ValueFromPipeline)] - $Ace, - $Type - ) - - process - { - foreach($aceEntry in $Ace) - { - $AceString = (ConvertTo-NtAccount $aceEntry.SecurityIdentifier) + ": " + $aceEntry.AceQualifier - if($aceEntry.AceFlags -ne "None") - { - $AceString += " " + $aceEntry.AceFlags - } - - if($aceEntry.AccessMask) - { - $foundAccess = Get-AccessRights $aceEntry.AccessMask $Type - - if($foundAccess) - { - $AceString += " ({0})" -f ($foundAccess -join ", ") - } - } - - $AceString - } - } - } - - $rawSecurityDescriptor = [Security.AccessControl.CommonSecurityDescriptor]::new($false,$false,$Sddl) - - $owner = ConvertTo-NtAccount $rawSecurityDescriptor.Owner - $group = ConvertTo-NtAccount $rawSecurityDescriptor.Group - $discretionaryAcl = ConvertTo-AceString $rawSecurityDescriptor.DiscretionaryAcl $Type - $systemAcl = ConvertTo-AceString $rawSecurityDescriptor.SystemAcl $Type - - [PSCustomObject] @{ - Owner = $owner - Group = $group - DiscretionaryAcl = @($discretionaryAcl) - SystemAcl = @($systemAcl) - RawDescriptor = $rawSecurityDescriptor - } -} diff --git a/src/Modules/Core/PSDiagnostics/PSDiagnostics.psd1 b/src/Modules/Core/PSDiagnostics/PSDiagnostics.psd1 deleted file mode 100644 index 3d73330c0a96c15203b362028fe12f57c9f6c791..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 1214 zcmbu9*-pY>5QWdRiSIzX(nN?TiZ>(>Tw)@Ih|6__f=$>$>lWh!`I724BZ@7qF-_Z_ znK?6O=1h5hs_I^gT2O9!?dwzr+EGPIYHLeHb$G6;tZn7B#wpMSr;_{37AVA0_R}W* z5{MF!0k$ru5}B7$HEOz2qDzf5@j4Af)SB=+=I-LlsqWsfKLacgr(q_K#SAp2(olCg z;yr+iG5=4-F}Wtx>%lPbY>)8yeZ~UOHTAi2AM(WhE2P5^>ow1g3YmTy^wVKBeY|HL z7f<`Po{Ge;z2E7HHbLGvq6O>FtIuaxcXS$A*P)I-srDLM&?Ys@u74W$k?RT7o33A* z+A){$ZK}l{MX1t4AJf)UZ1XOlS&UZ2O#e1Di?6utoeG@gYl1Hbm95)-qQ(e0+1p8)h}Ys>AgYJ(D!%%KH_Ye|Ad|) zvyr=G_@2pp#4OwExAHZQG7Kgm3*2ReDp^$Jk7vh<7}lO6%8g30)aFKR25e P))D%rJ@#+);2ZD)XDGiD diff --git a/src/Modules/Core/PSDiagnostics/PSDiagnostics.psm1 b/src/Modules/Core/PSDiagnostics/PSDiagnostics.psm1 deleted file mode 100644 index d36168f27d69af230b08b017761397df82fd8b03..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 23122 zcmeHPX>S|J5$&%IkpIAyh(LyyvUS_uI9S_~6C;*wSjOgq)>w!XB`a$kktoZX&HnWy z?{%@%$J8{35_LET2x^AYN8Qy`)jj&pzyIi_-S6G+TnnGSxjlE_w%wsSb0_%y*5CEr zvDAT=OKCx@T=#0ujBW&J4K)V`Hb%|ZqK*wN3AW4IK=n?<{?DF z+QRn)BL}!1x*hyI1Kcflgby)bYY*2w{2urb1I)dJd&RzwnYLWl!n$6*)0iA$9WI={t@*&+04_a}eHzU>6l$LY$TCx=0K2?QClgPAFZ79h69f+;g8 zXZo0Tc8Es_@)0OF1Wl8Jt26FFrzn5oF#rb!MGjEDC;03E8_H6s7n+1KHWf#Hlr{D( zbpQQOPwKeO(K)`<#eHByiLV16>Mretx;=26%+@-lt=YH=HFfZm<|Z)3-roT~8`2@D z60Yg2_uZSJJ<{@o%UkGUkEh17^%vi_H=K(cx$mB4ZT1Y5eHV7Sn~YsOe`=39L;GjI zJoRutjcIlH=(6RV0J9@dNl&tWu5o;7<3>uV{rOb-(}U~)^8;v%a<~N@q^~^2-%g~B z?ECAv|Dy+gdydIW@_aLDp^v3S%|Pyy&^G?kKORF)PvD(s`={vfZ88IAuYTwgX>E$> z6ZgQ~bsvnL@mTe!e71@4gh)@gi;;0#8+6Au`5KtgroKI&KkjYQSjBM8W0;OC;qb=m z(UJfA0(jD|lFwX!QXVzMV17&t-hw~$uIdXff(50L(!AlZo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^pt!U^*H#VO~~_u$-%alkX79oXZHEp+3Tx0=$y4Ry8K4^FQus_*{&OI>e(p*2&chLpcJD!3&(6k+lp7FJ7YmZ|#tB!=- zcyi39G9M#Ur;!3jE9|&Jka;1Px{e;Mh}We%T$!Y*DZ7%YH7Pw7-*f4wv|Uzb0{oKJTt=34dQ;Mz z%fM6J;rx29cXAEdRLvE*9~Ym=8rN4+YcK2fbk(~JdRz8+!Q+gtxi)pVwyUp8GnYwt z7u5;T5vAmR&8sxy^5uL=RW_5bUzJa6vvLx?gB48opuR^WP6_h=GRZzzx@Y^HZ)Fc% z+qvq?>AcpZ_vtxr9y>9^;QnwAs|){M4d19?{$=f^alBf4I*&f(`|4pno@dfM+?JWU z>NtBgZQb=zKnz`5^jaRTz0%r+a`-#XbM2E~MV`%`9(igRLo;iU|FID0PvKeAq}=Nc zYd-w%T^uXtZqqkZ6t6PlhP2VKY7QL3~(_Se?;)_E@a}f+}>F06| zl1ecUh@&N)+KKL1TjR=nxEeXD_qsa%rSzxpEH2d9$vdw{l!4}{*65qyVKsxk2sc&F zCuJ{HtZu?)s#pkbEZNmb-r7~M#@~eOwMr778@mnCxA3|N`CE82)d0p&JeSgRm-;5; zZ=K<~4f40}x<2`<-tV`Cd(`-ve=^B)ds(Pxl-O^))Jx+=3;E%vNwL>Xs`Q`qm~n#C_q<{tSyDpo(^|1-Rf7>Dn(ad)`xzhqM9Hedz$ zdv|=k7UdH5JACYw*OkKiblf|Ve6%`ST79zSsrE?mVS9kZeHi=Qy}G%ZjvZY`C4|w{ HXUgiom*a%< diff --git a/src/Modules/Shared/Microsoft.PowerShell.Management/Microsoft.PowerShell.Management.psd1 b/src/Modules/Full/Microsoft.PowerShell.Management/Microsoft.PowerShell.Management.psd1 similarity index 95% rename from src/Modules/Shared/Microsoft.PowerShell.Management/Microsoft.PowerShell.Management.psd1 rename to src/Modules/Full/Microsoft.PowerShell.Management/Microsoft.PowerShell.Management.psd1 index f9c517f440..f82518159e 100644 --- a/src/Modules/Shared/Microsoft.PowerShell.Management/Microsoft.PowerShell.Management.psd1 +++ b/src/Modules/Full/Microsoft.PowerShell.Management/Microsoft.PowerShell.Management.psd1 @@ -1,102 +1,102 @@ -@{ -GUID="EEFCB906-B326-4E99-9F54-8B4BB6EF3C6D" -Author="Microsoft Corporation" -CompanyName="Microsoft Corporation" -Copyright="© Microsoft Corporation. All rights reserved." -ModuleVersion="3.1.0.0" -PowerShellVersion="3.0" -CLRVersion="4.0" -NestedModules="Microsoft.PowerShell.Commands.Management.dll" -HelpInfoURI = 'http://go.microsoft.com/fwlink/?linkid=390785' -AliasesToExport = @("gcb", "scb", "gin", "gtz", "stz") -FunctionsToExport = @() -CmdletsToExport=@("Add-Content", - "Clear-Content", - "Clear-ItemProperty", - "Join-Path", - "Convert-Path", - "Copy-ItemProperty", - "Get-EventLog", - "Clear-EventLog", - "Write-EventLog", - "Limit-EventLog", - "Show-EventLog", - "New-EventLog", - "Remove-EventLog", - "Get-ChildItem", - "Get-Content", - "Get-ItemProperty", - "Get-ItemPropertyValue", - "Get-WmiObject", - "Invoke-WmiMethod", - "Move-ItemProperty", - "Get-Location", - "Set-Location", - "Push-Location", - "Pop-Location", - "New-PSDrive", - "Remove-PSDrive", - "Get-PSDrive", - "Get-Item", - "New-Item", - "Set-Item", - "Remove-Item", - "Move-Item", - "Rename-Item", - "Copy-Item", - "Clear-Item", - "Invoke-Item", - "Get-PSProvider", - "New-ItemProperty", - "Split-Path", - "Test-Path", - "Get-Process", - "Stop-Process", - "Wait-Process", - "Debug-Process", - "Start-Process", - "Remove-ItemProperty", - "Remove-WmiObject", - "Rename-ItemProperty", - "Register-WmiEvent", - "Resolve-Path", - "Get-Service", - "Stop-Service", - "Start-Service", - "Suspend-Service", - "Resume-Service", - "Restart-Service", - "Set-Service", - "New-Service", - "Set-Content", - "Set-ItemProperty", - "Set-WmiInstance", - "Get-Transaction", - "Start-Transaction", - "Complete-Transaction", - "Undo-Transaction", - "Use-Transaction", - "New-WebServiceProxy", - "Get-HotFix", - "Test-Connection", - "Enable-ComputerRestore", - "Disable-ComputerRestore", - "Checkpoint-Computer", - "Get-ComputerRestorePoint", - "Restart-Computer", - "Stop-Computer", - "Restore-Computer", - "Add-Computer", - "Remove-Computer", - "Test-ComputerSecureChannel", - "Reset-ComputerMachinePassword", - "Rename-Computer", - "Get-ControlPanelItem", - "Show-ControlPanelItem", - "Clear-Recyclebin", - "Get-Clipboard", - "Set-Clipboard", - "Get-ComputerInfo", - "Get-TimeZone", - "Set-TimeZone") -} +@{ +GUID="EEFCB906-B326-4E99-9F54-8B4BB6EF3C6D" +Author="Microsoft Corporation" +CompanyName="Microsoft Corporation" +Copyright="© Microsoft Corporation. All rights reserved." +ModuleVersion="3.1.0.0" +PowerShellVersion="3.0" +CLRVersion="4.0" +NestedModules="Microsoft.PowerShell.Commands.Management.dll" +HelpInfoURI = 'http://go.microsoft.com/fwlink/?linkid=390785' +AliasesToExport = @("gcb", "scb", "gin", "gtz", "stz") +FunctionsToExport = @() +CmdletsToExport=@("Add-Content", + "Clear-Content", + "Clear-ItemProperty", + "Join-Path", + "Convert-Path", + "Copy-ItemProperty", + "Get-EventLog", + "Clear-EventLog", + "Write-EventLog", + "Limit-EventLog", + "Show-EventLog", + "New-EventLog", + "Remove-EventLog", + "Get-ChildItem", + "Get-Content", + "Get-ItemProperty", + "Get-ItemPropertyValue", + "Get-WmiObject", + "Invoke-WmiMethod", + "Move-ItemProperty", + "Get-Location", + "Set-Location", + "Push-Location", + "Pop-Location", + "New-PSDrive", + "Remove-PSDrive", + "Get-PSDrive", + "Get-Item", + "New-Item", + "Set-Item", + "Remove-Item", + "Move-Item", + "Rename-Item", + "Copy-Item", + "Clear-Item", + "Invoke-Item", + "Get-PSProvider", + "New-ItemProperty", + "Split-Path", + "Test-Path", + "Get-Process", + "Stop-Process", + "Wait-Process", + "Debug-Process", + "Start-Process", + "Remove-ItemProperty", + "Remove-WmiObject", + "Rename-ItemProperty", + "Register-WmiEvent", + "Resolve-Path", + "Get-Service", + "Stop-Service", + "Start-Service", + "Suspend-Service", + "Resume-Service", + "Restart-Service", + "Set-Service", + "New-Service", + "Set-Content", + "Set-ItemProperty", + "Set-WmiInstance", + "Get-Transaction", + "Start-Transaction", + "Complete-Transaction", + "Undo-Transaction", + "Use-Transaction", + "New-WebServiceProxy", + "Get-HotFix", + "Test-Connection", + "Enable-ComputerRestore", + "Disable-ComputerRestore", + "Checkpoint-Computer", + "Get-ComputerRestorePoint", + "Restart-Computer", + "Stop-Computer", + "Restore-Computer", + "Add-Computer", + "Remove-Computer", + "Test-ComputerSecureChannel", + "Reset-ComputerMachinePassword", + "Rename-Computer", + "Get-ControlPanelItem", + "Show-ControlPanelItem", + "Clear-Recyclebin", + "Get-Clipboard", + "Set-Clipboard", + "Get-ComputerInfo", + "Get-TimeZone", + "Set-TimeZone") +} diff --git a/src/Modules/Shared/Microsoft.PowerShell.Security/Microsoft.PowerShell.Security.psd1 b/src/Modules/Full/Microsoft.PowerShell.Security/Microsoft.PowerShell.Security.psd1 similarity index 98% rename from src/Modules/Shared/Microsoft.PowerShell.Security/Microsoft.PowerShell.Security.psd1 rename to src/Modules/Full/Microsoft.PowerShell.Security/Microsoft.PowerShell.Security.psd1 index a5a678d7b8..6ec56e324d 100644 --- a/src/Modules/Shared/Microsoft.PowerShell.Security/Microsoft.PowerShell.Security.psd1 +++ b/src/Modules/Full/Microsoft.PowerShell.Security/Microsoft.PowerShell.Security.psd1 @@ -1,14 +1,14 @@ -@{ -GUID="A94C8C7E-9810-47C0-B8AF-65089C13A35A" -Author="Microsoft Corporation" -CompanyName="Microsoft Corporation" -Copyright="© Microsoft Corporation. All rights reserved." -ModuleVersion="3.0.0.0" -PowerShellVersion="3.0" -CLRVersion="4.0" -AliasesToExport = @() -FunctionsToExport = @() -CmdletsToExport="Get-Acl", "Set-Acl", "Get-PfxCertificate", "Get-Credential", "Get-ExecutionPolicy", "Set-ExecutionPolicy", "Get-AuthenticodeSignature", "Set-AuthenticodeSignature", "ConvertFrom-SecureString", "ConvertTo-SecureString", "Get-CmsMessage", "Unprotect-CmsMessage", "Protect-CmsMessage" , "New-FileCatalog" , "Test-FileCatalog" -NestedModules="Microsoft.PowerShell.Security.dll" -HelpInfoURI = 'http://go.microsoft.com/fwlink/?linkid=390786' -} +@{ +GUID="A94C8C7E-9810-47C0-B8AF-65089C13A35A" +Author="Microsoft Corporation" +CompanyName="Microsoft Corporation" +Copyright="© Microsoft Corporation. All rights reserved." +ModuleVersion="3.0.0.0" +PowerShellVersion="3.0" +CLRVersion="4.0" +AliasesToExport = @() +FunctionsToExport = @() +CmdletsToExport="Get-Acl", "Set-Acl", "Get-PfxCertificate", "Get-Credential", "Get-ExecutionPolicy", "Set-ExecutionPolicy", "Get-AuthenticodeSignature", "Set-AuthenticodeSignature", "ConvertFrom-SecureString", "ConvertTo-SecureString", "Get-CmsMessage", "Unprotect-CmsMessage", "Protect-CmsMessage" , "New-FileCatalog" , "Test-FileCatalog" +NestedModules="Microsoft.PowerShell.Security.dll" +HelpInfoURI = 'http://go.microsoft.com/fwlink/?linkid=390786' +} diff --git a/src/Modules/map.json b/src/Modules/map.json index 1186cdb401..b4278255e9 100644 --- a/src/Modules/map.json +++ b/src/Modules/map.json @@ -1,14 +1,12 @@ { "monad/miscfiles/modules/PSDiagnostics/PSDiagnostics.psd1": "Shared/PSDiagnostics/PSDiagnostics.psd1", + "monad/miscfiles/modules/PSDiagnostics/PSDiagnostics.psm1": "Shared/PSDiagnostics/PSDiagnostics.psm1", "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", @@ -30,6 +28,8 @@ "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.Security/Microsoft.PowerShell.Security.psd1": "Full/Microsoft.PowerShell.Security/Microsoft.PowerShell.Security.psd1", + "monad/miscfiles/modules/Microsoft.PowerShell.Management/Microsoft.PowerShell.Management.psd1": "Full/Microsoft.PowerShell.Management/Microsoft.PowerShell.Management.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", @@ -44,6 +44,7 @@ "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.Security/CoreClr/Microsoft.PowerShell.Security.psd1": "Core/Microsoft.PowerShell.Security/Microsoft.PowerShell.Security.psd1", "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" }