Skip to content

Commit

Permalink
Merge pull request #55 from voytas75/v1.5.1-dev2
Browse files Browse the repository at this point in the history
## 1.5.1 - 2019.04.09

### Changed

- Fix for scenario when there is no local and remote `get-scheduledtask`, added `invoke-SCHTasks`.
  • Loading branch information
voytas75 authored Apr 9, 2019
2 parents 0677faf + 530cb54 commit ca15fd0
Show file tree
Hide file tree
Showing 4 changed files with 15 additions and 3 deletions.
6 changes: 6 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,12 @@ All notable changes to this project will be documented in this file.

The format is based on [Keep a Changelog](http://keepachangelog.com/) and this project adheres to [Semantic Versioning](http://semver.org/).

## 1.5.1 - 2019.04.09

### Changed

- Fix for scenario when there is no local and remote `get-scheduledtask`, added `invoke-SCHTasks`.

## 1.5.0 - 2019.04.07

### Added
Expand Down
Binary file modified Find-TaskServiceUser.psd1
Binary file not shown.
2 changes: 1 addition & 1 deletion Find-TaskServiceUser.psm1
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ Foreach($import in @($files))
}

#check update
New-Variable -Name ModuleVersion -Value "1.5.0"
New-Variable -Name ModuleVersion -Value "1.5.1"

$url = "https://api.github.com/repos/voytas75/Find-TaskServiceUser/releases/latest"
$oldProtocol = [Net.ServicePointManager]::SecurityProtocol
Expand Down
10 changes: 8 additions & 2 deletions Find-TaskUser.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -97,8 +97,14 @@ Function Find-TaskUser {
}
}
catch {
Write-Verbose -Message $_
return $null
Write-Verbose -Message "$server`: No remote command Get-ScheduledTask: $_"
Write-Verbose -Message "$server`: Switch to SCHTASK."
if ($Strict) {
$remote_schtask_data = Invoke-SCHTasks -server $server -user $user -Strict
} else {
$remote_schtask_data = Invoke-SCHTasks -server $server -user $user
}
return $remote_schtask_data
}
}
#return Get-ScheduledTask -CimSession $server -ErrorAction stop | Where-Object {$_.author -match $user -or $_.Principal.userid -match $user} | Select-Object @{Name="Hostname"; Expression = {$_.PSComputerName}}, taskname, @{Name="Run As User"; Expression = {$_.Principal.userid}}, Author, URI
Expand Down

0 comments on commit ca15fd0

Please sign in to comment.