TeknowTools icon indicating copy to clipboard operation
TeknowTools copied to clipboard

NIC Configuration.

Open Krishnaykumaryadav4 opened this issue 5 years ago • 10 comments

This is for auto reboot.. It is possible to modify this based on the last reboot of 7 days.. then it only should prompt to the user and pop for force reboot.

Would be helpful to avoid the step and configuration of NIC enabling and disabling.!

To test this mentioned prerequisite and step should be easy to adopt.

Thank you.

Krishnaykumaryadav4 avatar Jan 31 '19 12:01 Krishnaykumaryadav4

Hi. I don't understand what you are asking. Could you describe a timeline of reboots, patches and notices like you would like to see?

As for the NIC disable/enable. You can bypass that with the -level parameter. A -level 'none' switch (or a modification of the default (line 183) will never disable the NIC.

teknowledgist avatar Jan 31 '19 13:01 teknowledgist

Thank you very much for quick responses.

Appreciate you for your time to look in this.. This script should be run like this..

It should check if the system is not rebooted last a 1 week / 168 hours then only it should prompt.. like First windows. Reboot Required

And continue snooze reminders 3-4 time between 2 hours interval.

At last if there is no interaction or action by user in between then initiate force reboot after the given hours deadline as per your Further window screenthost.

(https://github.com/teknowledgist/TeknowTools/tree/master/AutoReboot)

I tried the NIC bypass but didn't work properly.. Would appreciate if you could make a copy and remove NIC enabling or disabling parameter and give an example to run this script.. I am trying to test using SCCM.

Please specify the prerequisites if there any other script file / path should be avail in the remote client to get this prompt.

Krishnaykumaryadav4 avatar Jan 31 '19 13:01 Krishnaykumaryadav4

So, you don't want users to even be prompted if their machine has booted in the last 7 days? There is a 24 hour catch that prevents users who reboot every day from getting the notice. You want to increase that to 7 days?

First, you can do that to your copy yourself right now if you want. Line 1478. Just change the "24" to however many hours you want to ignore a pending reboot.

Second, with a 7 day "ignore" window and other settings as default, you could potentially have a machine with an active user (not just sitting there idle) be in a pending reboot state for over 16 days. Add to that the delay to deploying updates (from release), and you could easily be looking at machines vulnerable to the latest exploits for three weeks! That seems a bit excessive.

Finally, I can make the change to use a variable in the Initialize Strings section. That will make it easier to customize. I don't feel the need is great enough to make it modifiable through switches.

Am I understanding properly and making sense?

teknowledgist avatar Jan 31 '19 15:01 teknowledgist

Sir,

I want make sure mandatory system reboot be within 7 days.. This script should continue check the system and notify only the user system is not reboot last 7 days. (If user is not restarting system within a week then using the script egregiously send 3-4 snooze prompts notifications / reminder and at last initiate force reboot after the given deadline of 30 minute)

Your script and description is perfect, but i am facing challenges is to remove NIC parameter.

Also want to confirm if there only powershell script is required or any other file i.e. vb or parameter needs to be included. ?

Appreciate if you could make the change accordingly to use through SCCM.

Krishnaykumaryadav4 avatar Jan 31 '19 16:01 Krishnaykumaryadav4

So, you want the reboot time and reboot day to be varied depending on another date/time instead of the default of Friday at 5pm (or a different, fixed day/time)?

That is a bit trickier. Are you looking for a reboot deadline of:

  1. Seven days from the time the script first notices a pending reboot.
  2. Seven days from the time the user acknowledges (i.e. clicks "Remind me again in 4 hours") that a reboot is required?

Issues:

  1. The user could have very little time. For example, the script notices 5 minutes after the user leaves for the day, then the user is sick for a couple days, and then there is a weekend and/or a holiday. The user comes back and has only hours of warning.
  2. The deadline time in the initial window that the user is agreeing to would need to progress. That could be minimized if only the day floats, but the time (e.g. 17:00) is fixed. That could lead to a window of 7 days plus the number of hours (e.g. 17) to the time of that day, but would never be more than a total of 8 days.

Let me know which version you are thinking of, and I'll see what I can do. I'm changing jobs though, so my time to poke at it will be limited for a few weeks (at least).

Can I ask what is the issue with the NIC disabling? That is a "softer" way to convince users to reboot or to protect systems than a forced reboot. The script is supposed to allow for that feature to be disabled. If it's not working, I'd like to fix the bug. What are you seeing when you try to stop the NIC disabling feature?

Finally, the current PowerShell script is completely stand-alone. It does create a VBS to be run by the Scheduled Task, but you shouldn't need to play with that. You should be able to simply have the script run in an SCCM deployment and everything will be set up. You might want to use the Start parameter just to be sure it realizes you want to set it up.

teknowledgist avatar Jan 31 '19 18:01 teknowledgist

Thank you for you time... If you could make the change to use a variable in the Initialize Strings section then please do that and update..That will make it easier to customize per the condition.

Also slimier like the deadline mentioned by you would helpful..

Seven days from the time the script first notices a pending reboot. ( Any how system should reboot latest by serven days).. If user acknowledge and reboot then OK else popup remind 3 times in the interval of 2 or 4 hours (i.e. clicks "Remind me again in 2 hours ") that system is pending reboot last 7 days and its mandatory to reboot per compliance requirement. And final after 3 reminder notify user to force reboot.

If you can share you contact number then i can call you for further clarificaion

Thank you very much for the help.

Krishnaykumaryadav4 avatar Feb 01 '19 17:02 Krishnaykumaryadav4

And for the NIC disabling feedback.. I am worried about NIC changes since Its a critical configuration and could cause issues for me.

Thank you.!

Krishnaykumaryadav4 avatar Feb 01 '19 17:02 Krishnaykumaryadav4

Would appreciate if you could help

Krishnaykumaryadav4 avatar Feb 04 '19 05:02 Krishnaykumaryadav4

I tired the lastest one.. but not getting any result.. If you could mentioned the step who to test this would be helpfull.

Krishnaykumaryadav4 avatar Feb 04 '19 11:02 Krishnaykumaryadav4

reboot error reboot error

Getting attached error while pressing on reboot now or remind later

Krishnaykumaryadav4 avatar Feb 05 '19 08:02 Krishnaykumaryadav4