Jump to content
Sign in to follow this  
nicecube

Help needed / how i can get the patching day in script

Recommended Posts

Posted (edited)

Hello, I have made a script to send a notification to users to tell them that there will be Windows updates to advise them to save their work and leave their computers open. I would like to recover in the database the day of maintenance. Can someone tell me in which table I could find this information, or if there is a simpler way, I could make an extra data field but I would prefer that all be automatic.

sorry for my english it's not my main language

 

So far i foud this

SELECT NextInstallWindowServerTime FROM computerpatchingstats WHERE ComputerId = %computerid%

$sql_complete_date = "@sql_complete_date@"
$sql_date = $sql_complete_date -replace ".*=" -replace " .*"
$sql_date_day = (get-date $sql_date).DayOfWeek
echo $sql_date_day

 

Edited by nicecube

Share this post


Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Sign in to follow this  

×
×
  • Create New...