Solved

need assistance with a login script

Posted on 2014-11-24
7
185 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 79

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 79

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
NAS Cloud Backup Strategies

This article explains backup scenarios when using network storage. We review the so-called “3-2-1 strategy” and summarize the methods you can use to send NAS data to the cloud

 

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 79

Accepted Solution

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

Expert Comment

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

Featured Post

PRTG Network Monitor: Intuitive Network Monitoring

Network Monitoring is essential to ensure that computer systems and network devices are running. Use PRTG to monitor LANs, servers, websites, applications and devices, bandwidth, virtual environments, remote systems, IoT, and many more. PRTG is easy to set up & use.

Question has a verified solution.

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

In this article, I am going to show you how to simulate a multi-site Lab environment on a single Hyper-V host. I use this method successfully in my own lab to simulate three fully routed global AD Sites on a Windows 10 Hyper-V host.
This article runs through the process of deploying a single EXE application selectively to a group of user.
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…
This video discusses moving either the default database or any database to a new volume.

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