Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

PSResource: Resource to manage PowerShell Resources #400

Open
wants to merge 520 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
520 commits
Select commit Hold shift + click to select a range
9f7390b
reworking getcurrentstate
nickgw Nov 26, 2022
fc8d3a3
Updating GetCurrentState to correctly report only enforced parameters
nickgw Nov 26, 2022
b751911
Adding comment on minimum and maximumversion
nickgw Nov 26, 2022
3ec895b
Fixing getcurrentstate
nickgw Nov 27, 2022
96af154
no need to check versions if there are no resources on the system
nickgw Nov 27, 2022
b5103a6
check versions if resources is not null
nickgw Nov 27, 2022
4209791
fix comparisons
nickgw Nov 27, 2022
125caf6
Add verbosity
nickgw Nov 27, 2022
f2cdcaf
Check on correct list of dsc properties
nickgw Nov 27, 2022
e4a969b
Check singleinstance on right list of properties
nickgw Nov 27, 2022
eb12558
rearrange getcurrentstate
nickgw Nov 27, 2022
ca3c87e
Fixing maximumversion getting set
nickgw Nov 27, 2022
2f3dd64
Fixing maximum version assignment
nickgw Nov 27, 2022
d053f7c
Assign enum absent
nickgw Nov 27, 2022
5ef840b
rewrite getcurrentstate
nickgw Nov 27, 2022
b5c5233
rewrite getcurrentstate
nickgw Nov 28, 2022
26c73e8
mandatory not required
nickgw Nov 28, 2022
c7a2422
Fix foreach and exclude
nickgw Nov 28, 2022
8f8efbc
Fix ensure and remove default for installation type
nickgw Nov 28, 2022
9d19c85
Fix excludproperties
nickgw Nov 28, 2022
2ddeb77
Fix nullable and remove unnecessary verbose
nickgw Nov 28, 2022
b146adb
fixing verbose output and casting installationpolicy correctly
nickgw Nov 28, 2022
d26186a
Updating unit tests
nickgw Nov 28, 2022
547eb27
Updating unit tests
nickgw Nov 28, 2022
2da2103
Updating unit tests
nickgw Nov 28, 2022
a4a6830
Updating based on comments
nickgw Nov 28, 2022
d603bb8
Update integration tests
nickgw Nov 28, 2022
fc12b01
Fixing integration
nickgw Nov 28, 2022
3deca09
Fixing integration
nickgw Nov 28, 2022
f2fe191
Fixing integration
nickgw Nov 28, 2022
648439b
Fixing params hash
nickgw Nov 28, 2022
f538c98
Fix integration test final
nickgw Nov 28, 2022
018c287
Remove dupe sourcelocation
nickgw Nov 28, 2022
5141300
Add a test to remove psgallery before re-adding it
nickgw Nov 28, 2022
e0d6551
remove unregister-repository
nickgw Nov 28, 2022
7609910
Whitespace
nickgw Nov 29, 2022
dc53ef9
Restore resourceID
nickgw Nov 29, 2022
59cc4d9
cleanup config
nickgw Nov 29, 2022
f6d5818
Merge branch 'nickg_psresource_393' into nickg_psresource_398
nickgw Nov 29, 2022
25dacef
Update GetCurrentState to only return absent if module is not present…
nickgw Nov 29, 2022
96485e5
Add RemoveNonCompliantVersions parameter and update Modify()
nickgw Nov 29, 2022
bf8f9e8
resolve mergeconflicts
nickgw Nov 29, 2022
2c8b982
use properties
nickgw Nov 29, 2022
2cc657b
Add a test on sourceparam plus default
nickgw Nov 29, 2022
a22c364
Remove test integration and fix indent
nickgw Nov 29, 2022
61e7978
is set-psrepo the source of the error
nickgw Nov 29, 2022
a7b3c49
add verbose and debug
nickgw Nov 29, 2022
167af34
default:$true and set-psrepository should work with just name
nickgw Nov 29, 2022
6eb1c52
Skip set-psrepository
nickgw Nov 29, 2022
dd04fca
just use default
nickgw Nov 29, 2022
5a68efd
just trying to find root cause of error
nickgw Nov 29, 2022
13e0beb
Root cause is Register-PSRepository
nickgw Nov 29, 2022
5a1336f
Trying to force tls12
nickgw Nov 29, 2022
ff651cb
Remove setting SecurityProtocolType
nickgw Nov 29, 2022
47ad33f
Merge branch 'nickg_psresource_393' into nickg_psresource_398
nickgw Nov 29, 2022
b9bef37
Uninstall resources that do not meet compliance
nickgw Nov 29, 2022
d1ca3ce
Pass installation policy for shizandgigs
nickgw Nov 29, 2022
de63820
Fix maximum version
nickgw Nov 29, 2022
cd7ef60
Move break to correct place
nickgw Nov 29, 2022
42e3788
Set ensure correctly
nickgw Nov 29, 2022
43ffc82
Remove InstallationPolicy for -Default
nickgw Nov 29, 2022
6fb8c4d
Merge branch 'nickg_psresource_393' into nickg_psresource_398
nickgw Nov 29, 2022
b01b169
Fix uninstallResource
nickgw Nov 29, 2022
ae01880
Add versioningmet check in correct places
nickgw Nov 29, 2022
3c313eb
Add removenonCompliantVersions for Latest parameter
nickgw Nov 29, 2022
2772f43
Handle when module should be absent
nickgw Nov 29, 2022
95ace6c
Removing spaces around register
Nov 30, 2022
a7d5726
Output the version of psget and packagemanagement
Nov 30, 2022
c20a58e
output loaded version of psget
Nov 30, 2022
6760bed
output correct stuff
Nov 30, 2022
1b7c1bd
try adding a script forcing stuff
Nov 30, 2022
ef0eb59
Remove debug stuff
Nov 30, 2022
0abfc29
install psget if imissing
Nov 30, 2022
a569656
adding all missng folders
Nov 30, 2022
a7df5b4
Remove erroneous text
Nov 30, 2022
a70224f
whatever
Nov 30, 2022
f24d4f3
More test with script
nickgw Nov 30, 2022
e2a45c0
uncomplicate test-script
nickgw Nov 30, 2022
d1eaf72
Add errorhandling
nickgw Nov 30, 2022
bcc85a3
Add more output
nickgw Nov 30, 2022
4c7b3ec
Add erroraction stop
nickgw Nov 30, 2022
15e0b74
remove write-verbose
nickgw Nov 30, 2022
5967fb8
more verbose
nickgw Nov 30, 2022
6d9b143
Update modify()
nickgw Dec 1, 2022
1601723
hqrm
nickgw Dec 1, 2022
e2e972a
Merge branch 'nickg_psresource_393' into nickg_psresource_398
nickgw Dec 1, 2022
84283d9
Update code
nickgw Dec 1, 2022
ab788e7
Use find resource
nickgw Dec 1, 2022
715485b
adding verbosity
nickgw Dec 1, 2022
8d58cec
Adding verbosity
nickgw Dec 2, 2022
2d2d685
big refactor
nickgw Dec 2, 2022
edb2da4
refactor getcurrentstate for versionrequirements
nickgw Dec 2, 2022
a9c8438
Adding helper functions for modify()
nickgw Dec 2, 2022
c3a9b32
Fix GetVersionRequirement
nickgw Dec 2, 2022
20f85ff
fix getminimuminstalledversion
nickgw Dec 2, 2022
6d4f19b
Can enum be nullable
nickgw Dec 3, 2022
6f240e2
validateset on installationpolicy
nickgw Dec 4, 2022
0668554
Fix AppVeyor build
johlju Dec 4, 2022
c92892c
Merge pull request #2 from johlju/fix/appveyor-debug
nickgw Dec 4, 2022
b98aaaa
Fix unit tests
nickgw Dec 4, 2022
b2cd3c8
fix integration
nickgw Dec 4, 2022
9604bd0
Merge branch 'nickg_psresource_393' into nickg_psresource_398
nickgw Dec 4, 2022
ea26b87
forgot what i changed
nickgw Dec 4, 2022
c6b6037
try to pause integration
nickgw Dec 4, 2022
aa977d8
move appveyor halt
nickgw Dec 4, 2022
2c38f20
Whitespace
nickgw Dec 4, 2022
d47d3c1
Removing debug integration test code
nickgw Dec 4, 2022
52444e3
readd appveyor debug
nickgw Dec 4, 2022
5be467d
add appveyor in correct location
nickgw Dec 4, 2022
aa9bdc3
comment out appveyor
nickgw Dec 4, 2022
780bcce
readd appveyor
nickgw Dec 4, 2022
51b2e50
does this pass
nickgw Dec 5, 2022
b49c891
does this pass
nickgw Dec 5, 2022
04b1559
commenting out the rest of appveyor
nickgw Dec 5, 2022
6d5d9be
what about appveyor makes this pass
nickgw Dec 5, 2022
e067e70
wtf
nickgw Dec 5, 2022
fa5b589
what line makes integration pass
nickgw Dec 5, 2022
c034c48
does this line work
nickgw Dec 5, 2022
3944c7d
Adding block for integraiton tests
nickgw Dec 5, 2022
4494d04
whitespace
nickgw Dec 5, 2022
f71e693
Try forcing psget 1.0.0.1
nickgw Dec 5, 2022
bc01a40
Fix module import
nickgw Dec 5, 2022
7184dc6
move psget removal
nickgw Dec 5, 2022
67f4592
Comment out skipped tests and remove unused function
nickgw Dec 5, 2022
0fbf06c
Merge branch 'nickg_psresource_393' into nickg_psresource_398
nickgw Dec 5, 2022
d67f93a
begin writing tests
nickgw Dec 5, 2022
6ff9b9f
Updating appveyor
Dec 6, 2022
6ec60df
Remove unused InstallationPolicy enum
Dec 6, 2022
e11d288
Revert getcurrentstate
Dec 6, 2022
2e12540
Update tests
Dec 6, 2022
adec343
Remove integration tests modifying PSGallery since we have an open Is…
Dec 6, 2022
c7b1992
Update tests
Dec 6, 2022
8237fb6
Fixing unit test
Dec 6, 2022
d76071c
Merge branch 'nickg_psresource_393' into nickg_psresource_398
Dec 6, 2022
d06a732
Fix testversion functino
nickgw Dec 9, 2022
746bcf8
whitespace
nickgw Dec 9, 2022
6567ed0
remove whitespace
nickgw Dec 9, 2022
de04f76
whitespace
nickgw Dec 9, 2022
c53e2d7
whitespace
nickgw Dec 9, 2022
f7dfee6
Merge branch 'nickg_psresource_393' of https://github.com/nickgw/Comp…
nickgw Dec 9, 2022
c6158b0
Merge branch 'nickg_psresource_398' of https://github.com/wayfair-con…
nickgw Dec 10, 2022
d02ab11
Does this build
nickgw Dec 10, 2022
17eb521
resolve merge conflict
nickgw Dec 10, 2022
23ef662
update example in cbh
nickgw Dec 10, 2022
4cfbf2c
update buildworker for package
nickgw Dec 10, 2022
3cba759
update changelog
nickgw Dec 10, 2022
2f8f58e
Merge branch 'nickg_psresource_393' into nickg_psresource_398
nickgw Dec 10, 2022
a92a17e
fixing verbose messaging
nickgw Dec 10, 2022
ee8eb18
missing e
nickgw Dec 10, 2022
b1b9a1c
gate removenoncompliantversions
nickgw Dec 10, 2022
c212de5
gate removenoncompliantversions
nickgw Dec 10, 2022
2df4b26
Fix gating remove non compliant versions
nickgw Dec 10, 2022
4a08757
dont test versionrequirement with latest
nickgw Dec 10, 2022
ee3539a
change get versionrequirement to not take params
nickgw Dec 11, 2022
7e4e3e8
update due to comments
nickgw Dec 11, 2022
014e8bc
Merge branch 'nickg_psresource_393' into nickg_psresource_398
nickgw Dec 11, 2022
8f39ef1
Adding a couple examples
nickgw Dec 11, 2022
ae73d34
rename configs
nickgw Dec 11, 2022
3b9218d
Whitespace
nickgw Dec 11, 2022
79c4cbd
Merge branch 'nickg_psresource_393' into nickg_psresource_398
nickgw Dec 11, 2022
cba0d70
Adding nonconfigurable properties latestversion and versionrequirement
nickgw Dec 11, 2022
08f41dc
whitespace to re run pipeline
nickgw Dec 11, 2022
d80dea3
Fixing unit test
nickgw Dec 11, 2022
76a2508
Merge branch 'nickg_psresource_393' into nickg_psresource_398
nickgw Dec 11, 2022
ac13944
Allow the module to build
nickgw Dec 11, 2022
e49756f
rename vars to allow module to build
nickgw Dec 11, 2022
4a5ed93
fix indent
nickgw Dec 11, 2022
54d0873
fixing merge conflict
nickgw Dec 11, 2022
83f6284
fixing merge conflict
nickgw Dec 11, 2022
b8d9fa9
making properties hidden not nonconfigurable
nickgw Dec 11, 2022
d0d596e
remove erroneous s
nickgw Dec 11, 2022
c8c4491
update hidden properties
nickgw Dec 12, 2022
515e02b
Use requiredversion hidden property
nickgw Dec 12, 2022
bc77766
Revert changes to dsc_computer
nickgw Dec 12, 2022
e7b31e1
remove s from readme
nickgw Dec 12, 2022
61538ae
Use versionrequirement and rename functions
nickgw Dec 12, 2022
038a26e
Merge branch 'nickg_psresource_398' of https://github.com/wayfair-con…
nickgw Dec 13, 2022
317ce26
try hashtable
nickgw Dec 16, 2022
b116c3e
remove comments from before removenoncompliantversions
nickgw Dec 16, 2022
6cd48bf
Mock GetInstalledResource()
nickgw Dec 16, 2022
f6622e4
modulescope
nickgw Dec 16, 2022
a4d004b
use mockwith not scirptblock
nickgw Dec 16, 2022
c03ec9c
exactly is not a param of should
nickgw Dec 16, 2022
e832269
move shoulds
nickgw Dec 16, 2022
f60882c
omit the assert
nickgw Dec 16, 2022
9bc556d
update getlatestversion
nickgw Dec 16, 2022
06f9726
update
nickgw Dec 16, 2022
550f839
update mock-object
nickgw Dec 17, 2022
80b7a59
update getlatestversion
nickgw Dec 17, 2022
d4b4b71
move add member
nickgw Dec 17, 2022
89a28cf
update getlatestversion
nickgw Dec 17, 2022
74d008c
Update testlatestversion
nickgw Dec 17, 2022
27d427e
update mocks
nickgw Dec 17, 2022
4539dfd
use object type object
nickgw Dec 19, 2022
f93af1b
force and passthru
nickgw Dec 19, 2022
69a8ab8
Update getinstalledresource
nickgw Dec 19, 2022
34ad8ec
update testlatestversion
nickgw Dec 19, 2022
6c9e1d2
Update testsingleinstance
nickgw Dec 19, 2022
b84617c
first assertproperites test
nickgw Dec 19, 2022
90dc294
Name vars correctly
nickgw Dec 19, 2022
9a993dd
put things in module scope
nickgw Dec 19, 2022
abc4ea5
call the method on the object not allowprerelease
nickgw Dec 19, 2022
2d6a751
Update error messages
nickgw Dec 19, 2022
aae9173
Add more assertproperties tests
nickgw Dec 19, 2022
b7cdece
Finish tests on AssertProperties()
nickgw Dec 19, 2022
864dae3
wrap everything
nickgw Dec 19, 2022
0e7dbe8
wrap all the assertproperties tests
nickgw Dec 19, 2022
afe41e8
Update Latest test
nickgw Dec 19, 2022
37f5c7d
Write TestRepository tests
nickgw Dec 19, 2022
df38b2a
Write FindREsource tess
nickgw Dec 20, 2022
f91923e
Write unintsallresource test
nickgw Dec 20, 2022
531fa6b
Write TestVersionRequirement tests
nickgw Dec 20, 2022
ba411af
Update test for testrequiredversion
nickgw Dec 20, 2022
a3c823e
Write getminimuminstalledversion tests
nickgw Dec 20, 2022
cd4d8bd
Write getmaximuminstalledversion tests
nickgw Dec 20, 2022
999fb3a
Write getrequiredinstalledversion tests
nickgw Dec 20, 2022
bca7e47
begin to write getversinrequirement
nickgw Dec 20, 2022
c0c2257
Finish getversionrequirement tests
nickgw Dec 20, 2022
5c8ebee
Write GetRequiredVersionFromVersionRequirement tests and update GetVe…
nickgw Dec 20, 2022
8b35edb
Remove old method signatures
nickgw Dec 20, 2022
f21a968
Reinitialize obj on each test for getversionrequirement
nickgw Dec 20, 2022
0f98522
Add tests for GetNonCompliantVersions
nickgw Dec 20, 2022
a05920b
Rename getnoncompliantresources
nickgw Dec 20, 2022
71b3718
Adding string for unintsallnoncompliantversions
nickgw Dec 20, 2022
d87cb76
first stab at uninstallnoncompliantversions
nickgw Dec 20, 2022
7a57be6
wrap in {}
nickgw Dec 20, 2022
78a7e8c
Name folder for examples correctly
nickgw Dec 20, 2022
441c450
Adding tests for ResolveSingleInstance
nickgw Dec 20, 2022
de49b2e
Update versbose message for getnoncompliantresources
nickgw Dec 20, 2022
9d3addd
Begin writing GetCurrentState tests
nickgw Dec 20, 2022
d8e2f08
fix singleinstance getcurrentstate tests
nickgw Dec 20, 2022
f76956c
fix singleinstance getcurrentstate tests
nickgw Dec 20, 2022
2f0fb29
Write latest getcurrentstate tests
nickgw Dec 20, 2022
84547c2
Write min and max version getcurrentstate tests
nickgw Dec 20, 2022
13c2c07
begin writing removnoncompliantversions getcurrentstate tests
nickgw Dec 20, 2022
07c849c
write minimumversion and removenoncompliantversions
nickgw Dec 21, 2022
166bfd7
remove space
nickgw Dec 21, 2022
ead5845
wrap
nickgw Dec 21, 2022
4d725ab
Use Ensure enum in tests
nickgw Dec 23, 2022
a6eabea
remove bettercomments
nickgw Jan 14, 2023
1ecf40d
Merge remote-tracking branch 'origin/main' into nickg_psresource_398
nickgw Mar 11, 2023
8a4845d
Update SingleInstance to OnlySingleVersion
nickgw Mar 11, 2023
ce204c4
Update OnlySingleVersion classdoc
nickgw Mar 11, 2023
62abead
remove unnecessary returns
nickgw Mar 11, 2023
9ea0417
Handle both minimum and maximum version
nickgw Feb 11, 2024
804374e
Return prerelease version string in pre-release module
nickgw Feb 11, 2024
a87d39d
Merge remote-tracking branch 'origin/main' into nickg_psresource_398
Feb 12, 2024
4ef2b26
Merge remote-tracking branch 'upstream/main' into nickg_psresource_398
nickgw Aug 3, 2024
e128ea8
Fail on importing PowerShellGet if version is too low with allowprere…
nickgw Aug 5, 2024
aac17ac
respond to comments
nickgw Aug 5, 2024
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,8 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0

### Added

- PSResource
- New class-based resource to manage PowerShell resources. - Fixes [Issue #393](https://github.com/dsccommunity/ComputerManagementDsc/issues/393), [Issue #398](https://github.com/dsccommunity/ComputerManagementDsc/issues/398)
- PSResourceRepository
- New class-based resource to manage PowerShell Resource Repositories - Fixes [Issue #393](https://github.com/dsccommunity/ComputerManagementDsc/issues/393)
- Computer
Expand Down
5 changes: 5 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,7 @@ The **ComputerManagementDsc** module contains the following resources:
predictably handle the condition.
- **PowerPlan**: This resource allows specifying a power plan to activate.
- **PowerShellExecutionPolicy**: Specifies the desired PowerShell execution policy.
- **PSResource**: This resource manages PowerShell Resources, like modules.
- **PSResourceRepository**: This resource manages PowerShellGet repositories.
- **RemoteDesktopAdmin**: This resource will manage the remote desktop administration
settings on a computer.
Expand Down Expand Up @@ -86,3 +87,7 @@ Management Framework 5.0 or above.
### PSResourceRepository

The resource `PSResourceRepository` requires that the PowerShell modules `PowerShellGet` and `PackageManagement` are already present on the target computer.

### PSResource

The resource `PSResource` requires that the PowerShell modules `PowerShellGet` and `PackageManagement` are already present on the target computer.
Loading
Loading