Solved

need assistance with a login script

Posted on 2014-11-24
7
187 Views
Last Modified: 2014-11-25
can someone provide a login script that will:

1. start the windows firewall service and set to automatic
2. run the following uninstall:
MsiExec.exe /X{786A9F7E-CFEC-451F-B3C4-22EB11550FD8}

Open in new window

3. reboot the machine

thanks in advance.

S
0
Comment
Question by:siber1
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 4
  • 3
7 Comments
 
LVL 80

Expert Comment

by:David Johnson, CD, MVP
ID: 40463577
Here you go

sc start MPsSvc
sc config MpsSvc start=auto
MsiExec.exe /X{786A9F7E-CFEC-451F-B3C4-22EB11550FD8}

Open in new window

0
 

Author Comment

by:siber1
ID: 40463651
David, unfortunately this will not work in our case as the firewall is in a "disabled" state in "services.msc"

if I try to run your script here is the error:
The service cannot be started, either because it is disabled or because it has n
o enabled devices associated with it.

Open in new window


we need to take the firewall service out of a disabled state and start it with a login script.

thx
0
 
LVL 80

Expert Comment

by:David Johnson, CD, MVP
ID: 40463657
then reverse them
sc config MpsSvc start=auto
sc start MPsSvc
MsiExec.exe /X{786A9F7E-CFEC-451F-B3C4-22EB11550FD8}

Open in new window

0
Free eBook: Backup on AWS

Everything you need to know about backup and disaster recovery with AWS, for FREE!

 

Author Comment

by:siber1
ID: 40463685
that doesn't work when the firewall is disabled.

I found a way to do it via powershell:
Set-Service -Name "MpsSvc" -Status running -StartupType automatic

Open in new window


however, I need to find a way to run this via login script, currently I get the error about running scripts.
I can manually run this command, but how can I deploy this via gpo and not run into the remotesigned error?
0
 

Author Comment

by:siber1
ID: 40463721
found a way to do it

powershell -executionpolicy bypass -file \\fs1\deploy\fwenable.ps1
MsiExec.exe /X {786A9F7E-CFEC-451F-B3C4-22EB11550FD8} /q
gpupdate /force

Open in new window


powershell script:
Set-Service -Name "MpsSvc" -Status running -StartupType automatic

Open in new window

0
 
LVL 80

Accepted Solution

by:
David Johnson, CD, MVP earned 500 total points
ID: 40463730
PowerShell -ExecutionPolicy Bypass -File scriptname.ps1
0
 
LVL 80

Expert Comment

by:David Johnson, CD, MVP
ID: 40463743
your comment wasn't there when I started the answer.
0

Featured Post

Free Tool: Port Scanner

Check which ports are open to the outside world. Helps make sure that your firewall rules are working as intended.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

This article shows the method of using the Resultant Set of Policy Tool to locate Group Policy that applies a particular setting.
Previously, on our Nano Server Deployment series, we've created a new nano server image and deployed it on a physical server in part 2. Now we will go through configuration.
In this Micro Video tutorial you will learn the basics about Database Availability Groups and How to configure one using a live Exchange Server Environment. The video tutorial explains the basics of the Exchange server Database Availability grou…
This video demonstrates how to sync Microsoft Exchange Public Folders with smartphones using CodeTwo Exchange Sync and Exchange ActiveSync. To learn more about CodeTwo Exchange Sync and download the free trial, go to: http://www.codetwo.com/excha…

756 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question