Jump to content


anyweb

How can I forcefully upgrade Windows 7 or Windows 10 to the latest version of Windows 10 using System Center Configuration Manager (Current Branch)?

Recommended Posts

ok can you grab the app*.xml files and setup*.log stored in the $windows.~bt\Sources\Panther location after the windows upgrade failure, zip them up and attach them here i'll take a look.

Share this post


Link to post
Share on other sites

Thank you for the great work on this great tool.. 

 

Couple of question for you.. Is there a way to check that a hardwire is connected (network) and if not, exit the script.. along the same line I am not quite sure what information to place into the VPN section so that I can properly detect if the user is using VPN and then show the message you already have.  Are we looking to enter the gateway/subnetmask/

Thanks.

Share this post


Link to post
Share on other sites

Quote

Thank you for the great work on this great tool.. 

thanks!

yes you could check for the ip range that your network cables use (as opposed to wireless), and detect based on that,

all networks are different so you'll have to customize it somehow to suit your environment

cheers

niall

Share this post


Link to post
Share on other sites

6 hours ago, anyweb said:

thanks!

yes you could check for the ip range that your network cables use (as opposed to wireless), and detect based on that,

all networks are different so you'll have to customize it somehow to suit your environment

cheers

niall

Thanks for the reply.. I ended up using pieces from you as well as another script I found.. Bottom line I am testing for VPN connection and Wi-Fi.. In case this might help someone else in the future - 

 

# check for Wifi/Wireless connection

$WifiCheck = Get-wmiobject -class win32_networkadapter -namespace root\CIMV2 | where-object {$_.Name -match "Wifi" -or $_.Name -match "wireless" -and $_.name -notmatch "Microsoft Virtual WiFi Miniport Adapter" -and $_.netenabled -eq $true}
$WifiCheck = [bool]$WifiCheck


if ($WifiCheck -eq 'True')
    {LogWrite "An Active Wireless Connection was detected, aborting with Exit code 99"
    $text="An Active Wireless Connection was detected. The Windows 10 Required Upgrade cannot continue while connected to A Wireless Network.  Please disconnect from Wi-Fi and retry the upgrade from Software Center the next time you are in the office. `n`nPress OK to exit the upgrade."
    ShowMessage ($text)
    ExitWithCode "99"}
else
    {LogWrite "Wireless Connection not detected, continuing..."}

# check for Cisco AnyConnect VPN

$NICS = Get-WmiObject -Query "Select Name,NetEnabled from Win32_NetworkAdapter where (Name like '%AnyConnect%') and NetEnabled='True'"
$NICS = [bool]$NICS


if ($NICS -eq 'True')
    {LogWrite "Cisco AnyConnect VPN was detected, aborting with Exit code 99"
    $text="Cisco AnyConnect VPN detected. The Windows 10 Required Upgrade cannot continue while connected to $CompanyName via Cisco AnyConnect VPN, please retry the upgrade from Software Center the next time you are in the office. `n`nPress OK to exit the upgrade."
    ShowMessage ($text)
    ExitWithCode "99"}
else
    {LogWrite "Cisco AnyConnect VPN not detected, continuing..."}

Share this post


Link to post
Share on other sites

On 12/11/2019 at 12:06 PM, anyweb said:

thanks for sharing, please do let me know how you get on with this.

Just wanted to follow up and let you know I have had great success utilizing your script.. the error checking is superb.. thank you for the work and troubleshooting you have done to vet your script.. you are a life saver!!

  • Like 1

Share this post


Link to post
Share on other sites

Just wanted to follow up and let you know I have had great success utilizing your script.. the error checking is superb.. thank you for the work and troubleshooting you have done to vet your script.. you are a life saver!! 

great to hear it ! and thanks for the kind words @Jerzystransfer

Share this post


Link to post
Share on other sites

hi Marantz, I'm glad you figured it out and that you find it useful, please explain to others what you did so that they will know (if they need to)

Share this post


Link to post
Share on other sites

Hi,

I used this script in other companies and was working fine but now I'm facing a problem using powershell in constrained language mode (and I cannot change it to full), several steps are crashing due that.

image.png.62812f6bb81660b9b2f69faef366ad29.png

any thoughts?

 

Regards

 

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.

Loading...


×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.