From 9b6cd423533b257b167466dbf0c0fa4230c07a2d Mon Sep 17 00:00:00 2001 From: Tim Danner Date: Fri, 28 Oct 2016 16:05:57 -0500 Subject: [PATCH 1/5] The current snapin dll is usable as a PowerShell module if you provide the .psd1 file --- .gitignore | 3 +- Src/SwisPowerShell/SwisPowerShell.csproj | 3 + Src/SwisPowerShell/SwisPowerShell.psd1 | 96 ++++++++++++++++++++++++ 3 files changed, 101 insertions(+), 1 deletion(-) create mode 100644 Src/SwisPowerShell/SwisPowerShell.psd1 diff --git a/.gitignore b/.gitignore index c2c4e54ad..505e639ad 100644 --- a/.gitignore +++ b/.gitignore @@ -4,4 +4,5 @@ packages *.suo *.pyc *~ -.vscode \ No newline at end of file +.vscode +Build diff --git a/Src/SwisPowerShell/SwisPowerShell.csproj b/Src/SwisPowerShell/SwisPowerShell.csproj index f021df0d3..265c8f4cd 100644 --- a/Src/SwisPowerShell/SwisPowerShell.csproj +++ b/Src/SwisPowerShell/SwisPowerShell.csproj @@ -106,6 +106,9 @@ PreserveNewest Designer + + Always + diff --git a/Src/SwisPowerShell/SwisPowerShell.psd1 b/Src/SwisPowerShell/SwisPowerShell.psd1 new file mode 100644 index 000000000..8bdaf86d2 --- /dev/null +++ b/Src/SwisPowerShell/SwisPowerShell.psd1 @@ -0,0 +1,96 @@ +# +# Module manifest for module 'SwisPowerShell' +# +# Generated by: SolarWinds, Inc. +# +# Generated on: 10/28/2016 +# + +@{ + +# Script module or binary module file associated with this manifest. +RootModule = 'SwisPowerShell.dll' + +# Version number of this module. +ModuleVersion = '3.4.5' + +# ID used to uniquely identify this module +GUID = '337323ce-c5a9-4fed-b23c-452af922434d' + +# Author of this module +Author = 'SolarWinds, Inc.' + +# Company or vendor of this module +CompanyName = 'Unknown' + +# Copyright statement for this module +Copyright = '(c) 2016 SolarWinds, Inc.. All rights reserved.' + +# Description of the functionality provided by this module +# Description = '' + +# Minimum version of the Windows PowerShell engine required by this module +# PowerShellVersion = '' + +# Name of the Windows PowerShell host required by this module +# PowerShellHostName = '' + +# Minimum version of the Windows PowerShell host required by this module +# PowerShellHostVersion = '' + +# Minimum version of Microsoft .NET Framework required by this module +# DotNetFrameworkVersion = '' + +# Minimum version of the common language runtime (CLR) required by this module +# CLRVersion = '' + +# Processor architecture (None, X86, Amd64) required by this module +# ProcessorArchitecture = '' + +# Modules that must be imported into the global environment prior to importing this module +# RequiredModules = @() + +# Assemblies that must be loaded prior to importing this module +# RequiredAssemblies = @() + +# Script files (.ps1) that are run in the caller's environment prior to importing this module. +# ScriptsToProcess = @() + +# Type files (.ps1xml) to be loaded when importing this module +# TypesToProcess = @() + +# Format files (.ps1xml) to be loaded when importing this module +# FormatsToProcess = @() + +# Modules to import as nested modules of the module specified in RootModule/ModuleToProcess +# NestedModules = @() + +# Functions to export from this module +FunctionsToExport = '*' + +# Cmdlets to export from this module +CmdletsToExport = '*' + +# Variables to export from this module +VariablesToExport = '*' + +# Aliases to export from this module +AliasesToExport = '*' + +# List of all modules packaged with this module +# ModuleList = @() + +# List of all files packaged with this module +# FileList = @() + +# Private data to pass to the module specified in RootModule/ModuleToProcess +# PrivateData = '' + +# HelpInfo URI of this module +# HelpInfoURI = '' + +# Default prefix for commands exported from this module. Override the default prefix using Import-Module -Prefix. +# DefaultCommandPrefix = '' + +} + From 45ff5c7f1c6d2001354bc8fcd73c1ded8e3def6f Mon Sep 17 00:00:00 2001 From: Tim Danner Date: Fri, 28 Oct 2016 16:05:57 -0500 Subject: [PATCH 2/5] The current snapin dll is usable as a PowerShell module if you provide the .psd1 file --- Src/SwisPowerShell/SwisPowerShell.csproj | 3 + Src/SwisPowerShell/SwisPowerShell.psd1 | 96 ++++++++++++++++++++++++ 2 files changed, 99 insertions(+) create mode 100644 Src/SwisPowerShell/SwisPowerShell.psd1 diff --git a/Src/SwisPowerShell/SwisPowerShell.csproj b/Src/SwisPowerShell/SwisPowerShell.csproj index f021df0d3..265c8f4cd 100644 --- a/Src/SwisPowerShell/SwisPowerShell.csproj +++ b/Src/SwisPowerShell/SwisPowerShell.csproj @@ -106,6 +106,9 @@ PreserveNewest Designer + + Always + diff --git a/Src/SwisPowerShell/SwisPowerShell.psd1 b/Src/SwisPowerShell/SwisPowerShell.psd1 new file mode 100644 index 000000000..8bdaf86d2 --- /dev/null +++ b/Src/SwisPowerShell/SwisPowerShell.psd1 @@ -0,0 +1,96 @@ +# +# Module manifest for module 'SwisPowerShell' +# +# Generated by: SolarWinds, Inc. +# +# Generated on: 10/28/2016 +# + +@{ + +# Script module or binary module file associated with this manifest. +RootModule = 'SwisPowerShell.dll' + +# Version number of this module. +ModuleVersion = '3.4.5' + +# ID used to uniquely identify this module +GUID = '337323ce-c5a9-4fed-b23c-452af922434d' + +# Author of this module +Author = 'SolarWinds, Inc.' + +# Company or vendor of this module +CompanyName = 'Unknown' + +# Copyright statement for this module +Copyright = '(c) 2016 SolarWinds, Inc.. All rights reserved.' + +# Description of the functionality provided by this module +# Description = '' + +# Minimum version of the Windows PowerShell engine required by this module +# PowerShellVersion = '' + +# Name of the Windows PowerShell host required by this module +# PowerShellHostName = '' + +# Minimum version of the Windows PowerShell host required by this module +# PowerShellHostVersion = '' + +# Minimum version of Microsoft .NET Framework required by this module +# DotNetFrameworkVersion = '' + +# Minimum version of the common language runtime (CLR) required by this module +# CLRVersion = '' + +# Processor architecture (None, X86, Amd64) required by this module +# ProcessorArchitecture = '' + +# Modules that must be imported into the global environment prior to importing this module +# RequiredModules = @() + +# Assemblies that must be loaded prior to importing this module +# RequiredAssemblies = @() + +# Script files (.ps1) that are run in the caller's environment prior to importing this module. +# ScriptsToProcess = @() + +# Type files (.ps1xml) to be loaded when importing this module +# TypesToProcess = @() + +# Format files (.ps1xml) to be loaded when importing this module +# FormatsToProcess = @() + +# Modules to import as nested modules of the module specified in RootModule/ModuleToProcess +# NestedModules = @() + +# Functions to export from this module +FunctionsToExport = '*' + +# Cmdlets to export from this module +CmdletsToExport = '*' + +# Variables to export from this module +VariablesToExport = '*' + +# Aliases to export from this module +AliasesToExport = '*' + +# List of all modules packaged with this module +# ModuleList = @() + +# List of all files packaged with this module +# FileList = @() + +# Private data to pass to the module specified in RootModule/ModuleToProcess +# PrivateData = '' + +# HelpInfo URI of this module +# HelpInfoURI = '' + +# Default prefix for commands exported from this module. Override the default prefix using Import-Module -Prefix. +# DefaultCommandPrefix = '' + +} + From fbe77c97407fcabd8f7099cc5fb1b796d6c51b57 Mon Sep 17 00:00:00 2001 From: Tim Danner Date: Thu, 27 Jul 2017 14:59:45 -0500 Subject: [PATCH 3/5] Make SwisPowerShell output to its own directory for separate dependencies --- Src/Install/Product.wxs | 2 +- Src/SwisPowerShell/SwisPowerShell.csproj | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/Src/Install/Product.wxs b/Src/Install/Product.wxs index b7be9cebe..db66ab1eb 100644 --- a/Src/Install/Product.wxs +++ b/Src/Install/Product.wxs @@ -124,7 +124,7 @@ - + diff --git a/Src/SwisPowerShell/SwisPowerShell.csproj b/Src/SwisPowerShell/SwisPowerShell.csproj index 265c8f4cd..9c99e2d91 100644 --- a/Src/SwisPowerShell/SwisPowerShell.csproj +++ b/Src/SwisPowerShell/SwisPowerShell.csproj @@ -40,7 +40,7 @@ true full false - ..\..\bin\Debug\ + bin\Debug\ DEBUG;TRACE prompt 4 @@ -49,7 +49,7 @@ pdbonly true - ..\..\bin\Release\ + bin\Release\ TRACE prompt 4 From ff7791e841929792cc1c77555be8ccc088d8ada1 Mon Sep 17 00:00:00 2001 From: Tim Danner Date: Thu, 27 Jul 2017 16:40:20 -0500 Subject: [PATCH 4/5] Updates to build a powershell module --- Build | 2 +- Src/SwisPowerShell/SwisPowerShell.psd1 | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/Build b/Build index 32dbf5497..9bc7b54c1 160000 --- a/Build +++ b/Build @@ -1 +1 @@ -Subproject commit 32dbf549725ca7bdb61a59f9728c27a4a0960249 +Subproject commit 9bc7b54c10c48e5961699e0bc7a42c561854b48e diff --git a/Src/SwisPowerShell/SwisPowerShell.psd1 b/Src/SwisPowerShell/SwisPowerShell.psd1 index 8bdaf86d2..c41238e93 100644 --- a/Src/SwisPowerShell/SwisPowerShell.psd1 +++ b/Src/SwisPowerShell/SwisPowerShell.psd1 @@ -12,7 +12,7 @@ RootModule = 'SwisPowerShell.dll' # Version number of this module. -ModuleVersion = '3.4.5' +ModuleVersion = '0.0.0.1' # ID used to uniquely identify this module GUID = '337323ce-c5a9-4fed-b23c-452af922434d' @@ -21,7 +21,7 @@ GUID = '337323ce-c5a9-4fed-b23c-452af922434d' Author = 'SolarWinds, Inc.' # Company or vendor of this module -CompanyName = 'Unknown' +CompanyName = 'SolarWinds, Inc.' # Copyright statement for this module Copyright = '(c) 2016 SolarWinds, Inc.. All rights reserved.' From c92e96fd9f4b22ef112e6476947d3b5d75104e73 Mon Sep 17 00:00:00 2001 From: Tim Danner Date: Thu, 27 Jul 2017 16:47:43 -0500 Subject: [PATCH 5/5] Fix SwisPowerShell.dll path for signing --- Build | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Build b/Build index 9bc7b54c1..7dd819a36 160000 --- a/Build +++ b/Build @@ -1 +1 @@ -Subproject commit 9bc7b54c10c48e5961699e0bc7a42c561854b48e +Subproject commit 7dd819a3612d055fb2f263073b0c2bbc58deae2c