Solved

need assistance with a login script

Posted on 2014-11-24
7
181 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
  • 4
  • 3
7 Comments
 
LVL 78

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 78

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
 

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 78

Accepted Solution

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

Expert Comment

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

Join & Write a Comment

Follow this checklist to learn more about the 15 things you should never include in an email signature from personal quotes, animated gifs and out-of-date marketing content.
This article explains in simple steps how to renew expiring Exchange Server Internal Transport Certificate.
In this video we show how to create a Distribution Group in Exchange 2013. We show this process by using the Exchange Admin Center. Log into Exchange Admin Center.: First we need to log into the Exchange Admin Center. Navigate to the Recipients >>…
This tutorial will walk an individual through the process of transferring the five major, necessary Active Directory Roles, commonly referred to as the FSMO roles from a Windows Server 2008 domain controller to a Windows Server 2012 domain controlle…

746 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

Need Help in Real-Time?

Connect with top rated Experts

9 Experts available now in Live!

Get 1:1 Help Now