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

procative-remediation-creation.ps1 #19

Open
saqib-s opened this issue Nov 21, 2023 · 1 comment
Open

procative-remediation-creation.ps1 #19

saqib-s opened this issue Nov 21, 2023 · 1 comment

Comments

@saqib-s
Copy link

saqib-s commented Nov 21, 2023

Another minor typo, the file name is
procative-remediation-creation.ps1

it should be:

proactive-remediation-creation.ps1

@saqib-s
Copy link
Author

saqib-s commented Nov 22, 2023

and one more, should the winget upgrade command run in the detection script include the "--accept-source-agreements" argument. I noticed that when initially checking on a new machine I had to accept the source agreements before it would tell me if updates were available, and I see you include it in the remediation script not the detection script.

just tested this and the detection script hung on a new machine, when I added the "--accept-source-agreements" it detected correctly.

So I think the detection script should be like so?

if ($(&$winget upgrade --accept-source-agreements) -like "* $app_2upgrade *") {
	Write-Host "Upgrade available for: $app_2upgrade"
	exit 1 # upgrade available, remediation needed
}

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant