Import PowerShell cmdlets module based on SDK assembly's location
Fixes #45
This commit is contained in:
parent
26f0ac22fb
commit
0bf4e8cc6d
1 changed files with 2 additions and 1 deletions
|
|
@ -4,6 +4,7 @@ using System.Collections.Generic;
|
|||
using System.Diagnostics;
|
||||
using System.IO;
|
||||
using System.Linq;
|
||||
using System.Reflection;
|
||||
using System.Runtime.InteropServices;
|
||||
using System.Text;
|
||||
|
||||
|
|
@ -33,7 +34,7 @@ namespace LANCommander.SDK.PowerShell
|
|||
|
||||
AddArgument("ExecutionPolicy", "Unrestricted");
|
||||
|
||||
var moduleManifests = Directory.EnumerateFiles(Environment.CurrentDirectory, "LANCommander.PowerShell.psd1", SearchOption.AllDirectories);
|
||||
var moduleManifests = Directory.EnumerateFiles(Path.GetDirectoryName(Assembly.GetExecutingAssembly().Location), "LANCommander.PowerShell.psd1", SearchOption.AllDirectories);
|
||||
|
||||
if (moduleManifests.Any())
|
||||
AddModule(moduleManifests.First());
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue