Skip to content

Commit 3db8ec0

Browse files
First contribution ever!
1 parent a54cf0e commit 3db8ec0

File tree

4 files changed

+155
-1
lines changed

4 files changed

+155
-1
lines changed

AD-COMPUTER-Get-DomainComputer/Get-DomainComputer.ps1

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
Function Get-DomainComputer {
1+
function Get-DomainComputer {
22
<#
33
.SYNOPSIS
44
The Get-DomainComputer function allows you to get information from an Active Directory Computer object using ADSI.
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
Import-Module "$PSScriptRoot\Get-DomainComputer.psd1"
2+
Import-Module "$PSScriptRoot\pester-installables\Pester\src\Pester.psd1"
3+
4+
Describe "AD-COMPUTER-Get-DomainComputer test for returning object"{
5+
$script:test=0
6+
$script:test++
7+
It "$("$script:test".padleft(3, '0')): Syntax test"{
8+
(Get-Command -Syntax Get-DomainComputer).Trim()| Should -BeTrue #Can be changed if someone gives me the output of the command before the pipeline
9+
}
10+
$script:test++
11+
It "$("$script:test".padleft(3, '0')): Compatibility with test objects"{
12+
try{
13+
Get-DomainComputer -ComputerName "dummycomputer" -Domain "dummydomain"
14+
$true| Should -BeTrue #Can be changed if someone gives me the output of Get-DomainComputer in xml format, after export the object via $object|Export-CliXML "<Path>"
15+
}
16+
catch{
17+
Write-Host "$($_.exception.message) $($_.errordetails.message)"
18+
$false| Should -BeTrue
19+
}
20+
}
21+
}
Lines changed: 132 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,132 @@
1+
#
2+
# Module manifest for module 'Get-DomainComputer'
3+
#
4+
# Generated by: subhambose
5+
#
6+
# Generated on: 6/13/2024
7+
#
8+
9+
@{
10+
11+
# Script module or binary module file associated with this manifest.
12+
# RootModule = ''
13+
14+
# Version number of this module.
15+
ModuleVersion = '0.0.1'
16+
17+
# Supported PSEditions
18+
# CompatiblePSEditions = @()
19+
20+
# ID used to uniquely identify this module
21+
GUID = '3fdb0a04-0fe7-45fd-ab41-48c3b2522289'
22+
23+
# Author of this module
24+
Author = 'subhambose'
25+
26+
# Company or vendor of this module
27+
CompanyName = 'Unknown'
28+
29+
# Copyright statement for this module
30+
Copyright = '(c) subhambose. All rights reserved.'
31+
32+
# Description of the functionality provided by this module
33+
# Description = ''
34+
35+
# Minimum version of the PowerShell engine required by this module
36+
# PowerShellVersion = ''
37+
38+
# Name of the PowerShell host required by this module
39+
# PowerShellHostName = ''
40+
41+
# Minimum version of the PowerShell host required by this module
42+
# PowerShellHostVersion = ''
43+
44+
# Minimum version of Microsoft .NET Framework required by this module. This prerequisite is valid for the PowerShell Desktop edition only.
45+
# DotNetFrameworkVersion = ''
46+
47+
# Minimum version of the common language runtime (CLR) required by this module. This prerequisite is valid for the PowerShell Desktop edition only.
48+
# ClrVersion = ''
49+
50+
# Processor architecture (None, X86, Amd64) required by this module
51+
# ProcessorArchitecture = ''
52+
53+
# Modules that must be imported into the global environment prior to importing this module
54+
# RequiredModules = @()
55+
56+
# Assemblies that must be loaded prior to importing this module
57+
# RequiredAssemblies = @()
58+
59+
# Script files (.ps1) that are run in the caller's environment prior to importing this module.
60+
# ScriptsToProcess = @()
61+
62+
# Type files (.ps1xml) to be loaded when importing this module
63+
# TypesToProcess = @()
64+
65+
# Format files (.ps1xml) to be loaded when importing this module
66+
# FormatsToProcess = @()
67+
68+
# Modules to import as nested modules of the module specified in RootModule/ModuleToProcess
69+
NestedModules = @('./../../../AD-COMPUTER-Get-DomainComputer/Get-DomainComputer.ps1')
70+
71+
# Functions to export from this module, for best performance, do not use wildcards and do not delete the entry, use an empty array if there are no functions to export.
72+
FunctionsToExport = '*'
73+
74+
# Cmdlets to export from this module, for best performance, do not use wildcards and do not delete the entry, use an empty array if there are no cmdlets to export.
75+
CmdletsToExport = '*'
76+
77+
# Variables to export from this module
78+
VariablesToExport = '*'
79+
80+
# Aliases to export from this module, for best performance, do not use wildcards and do not delete the entry, use an empty array if there are no aliases to export.
81+
AliasesToExport = '*'
82+
83+
# DSC resources to export from this module
84+
# DscResourcesToExport = @()
85+
86+
# List of all modules packaged with this module
87+
# ModuleList = @()
88+
89+
# List of all files packaged with this module
90+
# FileList = @()
91+
92+
# Private data to pass to the module specified in RootModule/ModuleToProcess. This may also contain a PSData hashtable with additional module metadata used by PowerShell.
93+
PrivateData = @{
94+
95+
PSData = @{
96+
97+
# Tags applied to this module. These help with module discovery in online galleries.
98+
# Tags = @()
99+
100+
# A URL to the license for this module.
101+
# LicenseUri = ''
102+
103+
# A URL to the main website for this project.
104+
# ProjectUri = ''
105+
106+
# A URL to an icon representing this module.
107+
# IconUri = ''
108+
109+
# ReleaseNotes of this module
110+
# ReleaseNotes = ''
111+
112+
# Prerelease string of this module
113+
# Prerelease = ''
114+
115+
# Flag to indicate whether the module requires explicit user acceptance for install/update/save
116+
# RequireLicenseAcceptance = $false
117+
118+
# External dependent modules of this module
119+
# ExternalModuleDependencies = @()
120+
121+
} # End of PSData hashtable
122+
123+
} # End of PrivateData hashtable
124+
125+
# HelpInfo URI of this module
126+
# HelpInfoURI = ''
127+
128+
# Default prefix for commands exported from this module. Override the default prefix using Import-Module -Prefix.
129+
# DefaultCommandPrefix = ''
130+
131+
}
132+
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
New-ModuleManifest Get-DomainComputer.psd1 -NestedModules "./../../../AD-COMPUTER-Get-DomainComputer/Get-DomainComputer.ps1"

0 commit comments

Comments
 (0)