Powershell script to change service account

Does anyone have a Powershell script to change the credentials used by a Windows service?

Answers


Bit easier - use WMI.

$service = gwmi win32_service -computer [computername] -filter "name='whatever'"
$service.change($null,$null,$null,$null,$null,$null,$null,"P@ssw0rd")

Change the service name appropriately in the filter; set the remote computer name appropriately.


Need Your Help

Laravel 5 composer update when the branch changes to master

php composer-php laravel-5

If I am going to install laravel 5 dev-develop and then next week taylor will merge the development branch to the master. How can I update through composer then?

Go to a specific jsp page after authentication (spring security)

java spring jsp spring-mvc spring-security

I have 3 type of users in my application, and every user has a his own jsp page. I want that after authentication, every user is redirect to his "own" page, how can this be done?

About UNIX Resources Network

Original, collect and organize Developers related documents, information and materials, contains jQuery, Html, CSS, MySQL, .NET, ASP.NET, SQL, objective-c, iPhone, Ruby on Rails, C, SQL Server, Ruby, Arrays, Regex, ASP.NET MVC, WPF, XML, Ajax, DataBase, and so on.