Skip to content

Commit 0efcd31

Browse files
refactor: ✨ streamline Get-IISParsedLog usage in examples
* Simplified the usage of `Get-IISParsedLog` by removing unnecessary `Select-Object` calls. * Updated artifact naming in `Build-Module.ps1` to reflect the correct module name `IISParser`.
1 parent c84df9a commit 0efcd31

2 files changed

Lines changed: 5 additions & 9 deletions

File tree

Module/Build/Build-Module.ps1

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,6 @@ Build-Module -ModuleName 'IISParser' {
2424
}
2525
New-ConfigurationManifest @Manifest
2626

27-
2827
$ConfigurationFormat = [ordered] @{
2928
RemoveComments = $false
3029

@@ -90,13 +89,10 @@ Build-Module -ModuleName 'IISParser' {
9089

9190
New-ConfigurationBuild @newConfigurationBuildSplat
9291

93-
# Copy formatting file to module output
94-
# New-ConfigurationModule -Type RequiredFile -Path "$PSScriptRoot\..\..\DnsClientX.PowerShell\DnsClientX.Format.ps1xml" -Destination 'DnsClientX.Format.ps1xml'
95-
9692
New-ConfigurationArtefact -Type Unpacked -Enable -Path "$PSScriptRoot\..\Artefacts\Unpacked" -RequiredModulesPath "$PSScriptRoot\..\Artefacts\Unpacked\Modules"
97-
New-ConfigurationArtefact -Type Packed -Enable -Path "$PSScriptRoot\..\Artefacts\Packed" -IncludeTagName -ArtefactName "DnsClientX-PowerShellModule.<TagModuleVersionWithPreRelease>.zip" -ID 'ToGitHub'
93+
New-ConfigurationArtefact -Type Packed -Enable -Path "$PSScriptRoot\..\Artefacts\Packed" -IncludeTagName -ArtefactName "IISParser-PowerShellModule.<TagModuleVersionWithPreRelease>.zip" -ID 'ToGitHub'
9894

9995
# global options for publishing to github/psgallery
10096
#New-ConfigurationPublish -Type PowerShellGallery -FilePath 'C:\Support\Important\PowerShellGalleryAPI.txt' -Enabled:$true
101-
#New-ConfigurationPublish -Type GitHub -FilePath 'C:\Support\Important\GitHubAPI.txt' -UserName 'EvotecIT' -Enabled:$true -ID 'ToGitHub' -OverwriteTagName 'DnsClientX-PowerShellModule.<TagModuleVersionWithPreRelease>'
97+
#New-ConfigurationPublish -Type GitHub -FilePath 'C:\Support\Important\GitHubAPI.txt' -UserName 'EvotecIT' -Enabled:$true -ID 'ToGitHub' -OverwriteTagName 'IISParser-PowerShellModule.<TagModuleVersionWithPreRelease>'
10298
}

Module/Examples/GetLogs.ps1

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
Import-Module $PSScriptRoot\..\IISParser.psd1 -Force
22

3-
Get-IISParsedLog -FilePath "C:\Support\GitHub\IISParser\Ignore\u_ex220507.log" | Select-Object -First 5 | Format-Table
4-
Get-IISParsedLog -FilePath "C:\Support\GitHub\IISParser\Ignore\u_ex220507.log" | Select-Object -Last 5 | Format-Table
3+
Get-IISParsedLog -FilePath "C:\Support\GitHub\IISParser\Ignore\u_ex220507.log" -First 5 | Format-Table
4+
Get-IISParsedLog -FilePath "C:\Support\GitHub\IISParser\Ignore\u_ex220507.log" -Last 5 | Format-Table
55
Get-IISParsedLog -FilePath "C:\Support\GitHub\IISParser\Ignore\u_ex220507.log" -First 5 -Last 5 -Skip 1 | Format-Table
6-
Get-IISParsedLog -FilePath "C:\Support\GitHub\IISParser\Ignore\u_ex220507.log" -Expand | Select-Object -First 1 | Format-List
6+
Get-IISParsedLog -FilePath "C:\Support\GitHub\IISParser\Ignore\u_ex220507.log" -Expand -First 1 | Format-List

0 commit comments

Comments
 (0)