-
Notifications
You must be signed in to change notification settings - Fork 8.3k
Added BinPath, Description, UserName and Delayed Auto Start to Get-Service #4907
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
Merged
Merged
Changes from 1 commit
Commits
Show all changes
21 commits
Select commit
Hold shift + click to select a range
ea4e2d2
[Feature]Added BinPath, Description, UserName and Delayed Auto Start …
joandrsn d3f64b1
[Feature]StartupType added with support for automatic delayed start o…
joandrsn 58b1303
[Feature]StartupType reverted back from a public property
joandrsn fa97af5
[Feature]Corrected error written if delayed auto start boolean could …
joandrsn 29ce383
[Feature]Corrected the exception message to be thrown where it was ac…
joandrsn b758abe
[Feature]Correct tests for linux and osx.
joandrsn 5101150
[Feature]Freed the memory after using pointers. Corrected documentati…
joandrsn e6a56f9
[Feature]Use the corrrect dereferencing method when freeing pointers
joandrsn 175897a
[Feature]Changed to AllocCoTaskMem when reserving memory
joandrsn b4b06da
[Feature]Corrected formatting
joandrsn 51930c9
[Feature]Added spaces before IsWindow check
joandrsn 17922cf
[Feature]Corrected indention in test
joandrsn 1eef742
[Feature]Renamed variable names for readability and consistency.
joandrsn d3c818c
[Feature]Moved FreeCoTaskMem to finally block on New-Service and Set-…
joandrsn a8120ea
[Feature]Remove FreeCoTaskMem(buffer) as the variable was renamed and…
joandrsn 9e4bf0c
[Feature]Made generic function to query for service information.
joandrsn de135ba
Merged changes made to master since original pull request
joandrsn 9e2ddb3
[Feature]Corrected indention
joandrsn 755e192
[Feature]Corrected error message to refence the new name
joandrsn 791cfea
Merge branch 'master' of https://github.com/PowerShell/PowerShell int…
joandrsn a9a2b32
[Feature]Corrected missed merge errors and made a InvalidValue Servic…
joandrsn File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
[Feature]Corrected formatting
- Loading branch information
commit b4b06da4e0879c1e7e550bf15043693ca2101f76
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -5,17 +5,17 @@ Describe "Set/New/Remove-Service cmdlet tests" -Tags "Feature", "RequireAdminOnW | |
| $PSDefaultParameterValues["it:skip"] = $true | ||
| } | ||
| if($IsWindows) { | ||
| $userName = "testuserservices" | ||
| $testPass = "Secret123!" | ||
| net user $userName $testPass /add > $null | ||
| $password = ConvertTo-SecureString $testPass -AsPlainText -Force | ||
| $creds = [pscredential]::new(".\$userName", $password) | ||
| $userName = "testuserservices" | ||
| $testPass = "Secret123!" | ||
| net user $userName $testPass /add > $null | ||
| $password = ConvertTo-SecureString $testPass -AsPlainText -Force | ||
| $creds = [pscredential]::new(".\$userName", $password) | ||
| } | ||
| } | ||
| AfterAll { | ||
| $global:PSDefaultParameterValues = $originalDefaultParameterValues | ||
| if($IsWindows) { | ||
| net user $userName /delete > $null | ||
| net user $userName /delete > $null | ||
| } | ||
| } | ||
|
|
||
|
|
@@ -241,7 +241,7 @@ Describe "Set/New/Remove-Service cmdlet tests" -Tags "Feature", "RequireAdminOnW | |
| { Remove-Service -Name "testremoveservice" -ErrorAction 'Stop' } | ShouldBeErrorId "InvalidOperationException,Microsoft.PowerShell.Commands.RemoveServiceCommand" | ||
| } | ||
|
|
||
| It "Get-Service can get the '<property>' of a service" -TestCases @( | ||
| It "Get-Service can get the '<property>' of a service" -TestCases @( | ||
|
Collaborator
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Please correct indentation in the test.
Collaborator
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Closed. |
||
| @{property = "Description"; value = "This is a test description"} | ||
| @{property = "BinPath"; value = "$PSHOME\powershell.exe"; parameters = @{ BinaryPathName = "$PSHOME\powershell.exe" }}, | ||
| @{property = "UserName"; value = $creds.UserName; parameters = @{ Credential = $creds }}, | ||
|
|
||
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please add spaces - use common formatting convention. Below too.