Solved

need assistance with a login script

Posted on 2014-11-24
7
188 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 81

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 81

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
NFR key for Veeam Backup for Microsoft Office 365

Veeam is happy to provide a free NFR license (for 1 year, up to 10 users). This license allows for the non‑production use of Veeam Backup for Microsoft Office 365 in your home lab without any feature limitations.

 

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 81

Accepted Solution

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

Expert Comment

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

Featured Post

Enroll in May's Course of the Month

May’s Course of the Month is now available! Experts Exchange’s Premium Members and Team Accounts have access to a complimentary course each month as part of their membership—an extra way to increase training and boost professional development.

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.
After hours on line I found a solution which pointed to the inherited Active Directory permissions . You have to give/allow permissions to the "Exchange trusted subsystem" for the user in the Active Directory...
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 shows how to use Hyena, from SystemTools Software, to update 100 user accounts from an external text file. View in 1080p for best video quality.

752 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