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
Solved

need assistance with a login script

Posted on 2014-11-24
7
186 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 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
Netscaler Common Configuration How To guides

If you use NetScaler you will want to see these guides. The NetScaler How To Guides show administrators how to get NetScaler up and configured by providing instructions for common scenarios and some not so common ones.

 

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

Optimizing Cloud Backup for Low Bandwidth

With cloud storage prices going down a growing number of SMBs start to use it for backup storage. Unfortunately, business data volume rarely fits the average Internet speed. This article provides an overview of main Internet speed challenges and reveals backup best practices.

Question has a verified solution.

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

A brief introduction to what I consider to be the best editor for PowerShell.
This article outlines the process to identify and resolve account lockout in an Active Directory environment.
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…
how to add IIS SMTP to handle application/Scanner relays into office 365.

809 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