You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: ReadMe.md
+2-1Lines changed: 2 additions & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -18,6 +18,7 @@ Some of the functionality provided by the cmdlets in this module:
18
18
- vCenter connection information (in title of PowerShell window)
19
19
- Datastore evacuation, template evacuation from VMHosts
20
20
- Mining virtual portgroup information (cluster-locations)
21
+
- Determining parent/base vSphere object types for use in parameter type-ing in subsequent function development
21
22
22
23
<aid="quickStart"></a>
23
24
### QuickStart
@@ -45,7 +46,7 @@ The [ChangeLog](ChangeLog.md) for this module is, of course, a log of the major
45
46
- download the module, either from the latest release's .zip file on the [vNugglets.Utility Releases](https://github.com/vNugglets/vNuggletsPSMod/releases) page, or by cloning the project to some local folder with Git via:
- put the actual PowerShell module directory in some place that you like to keep your modules, say, like this, which copies the module to your personal Modules directory:
Description="Module with the super useful functions that were previously scattered about the web by the vNugglets team (particularly, at vNugglets.com)"
15
22
## some aliases, both as written, and with "VN" prefixed on them
## scripts (.ps1) that are listed in the NestedModules key are run in the module's session state, not in the caller's session state. To run a script in the caller's session state, list the script file name in the value of the ScriptsToProcess key in the manifest; RegisterArgCompleter apparently needs to be added _after_ function definition .ps1 files are run (via NestedModules) (else, given functions are not defined, and if RegisterArgCompleter is referring to commands from module dynamically, it would not get them; that is the case if the function definitions are in a .psm1 file instead of .ps1 file, and are being defined in NestedModules)
## check that the FileList property holds the names of all of the files in the module directory, relative to the module directory
44
+
## the relative names of the files in the module directory (just filename for those in module directory, "subdir\filename.txt" for a file in a subdir, etc.)
if ($arrDiffResults= (Compare-Object-ReferenceObject $hshManifestParams.FileList-DifferenceObject $arrRelativeNameOfFilesInModuleDirectory)) {Write-Error"Uh-oh -- FileList property value for making/updating module manifest and actual files present in module directory do not match. Better check that. The variance:`n$($arrDiffResults|Out-String)"} else {Write-Verbose-Verbose "Hurray, all of the files in the module directory are named in the FileList property to use for the module manifest"}
## replace the comment in the resulting module manifest that includes "PSGet_" prefixed to the actual module name with a line without "PSGet_" in it
37
-
(Get-Content-Path $strFilespecForPsd1-Raw).Replace("# Module manifest for module 'PSGet_vNugglets.Utility'","# Module manifest for module 'vNugglets.Utility'") |Set-Content-Path $strFilespecForPsd1
53
+
(Get-Content-Path $strFilespecForPsd1-Raw).Replace("# Module manifest for module 'PSGet_$strModuleName'","# Module manifest for module '$strModuleName'") |Set-Content-Path $strFilespecForPsd1
38
54
} ## end if
39
55
} ## end prcoess
40
-
41
-
42
-
<#
43
-
## used for original manifest creation
44
-
$hshModManifestParams = @{
45
-
Path = $strFilespecForPsd1
46
-
Author = "Matt Boren"
47
-
CompanyName = "vNugglets.com"
48
-
Copyright = "MIT License"
49
-
## when setting value for DefaultCommandPrefix in module, need to account for that when setting value for Aliases anywhere (need to code those to point at what the functions _will_ be called when the DefaultCommandPrefix is applied)
50
-
#DefaultCommandPrefix = ""
51
-
#FormatsToProcess = "SomeModule.format.ps1xml"
52
-
ModuleToProcess = "vNuggletsUtilityMod.psm1"
53
-
ModuleVersion = "1.1.0"
54
-
## scripts (.ps1) that are listed in the NestedModules key are run in the module's session state, not in the caller's session state. To run a script in the caller's session state, list the script file name in the value of the ScriptsToProcess key in the manifest
Description = "Module with the functions that have previously been scattered about the web by the vNugglets team (particularly, at vNugglets.com"
58
-
## specifies script (.ps1) files that run in the caller's session state when the module is imported. You can use these scripts to prepare an environment, just as you might use a login script
## using -PassThru so as to pass the generated module manifest contents to a var for later output as ASCII (instead of having a .psd1 file of default encoding, Unicode)
## have to do in separate step, as PSD1 file is "being used by another process" -- the New-ModuleManifest cmdlet, it seems
69
-
# in order to have this module usable (importable) via PowerShell v2, need to update the newly created .psd1 file, replacing the 'RootModule' keyword with 'ModuleToProcess'
0 commit comments