We have an order printing process utilizing a third party application that has registered Windows services to control the printing in the Warehouse. For unknown reasons these services randomly stop printing, even though the services are running. The fix is to just restart them. I have setup a scheduled task to restart them daily using the same Powershell script below, but what if someone needs to do them during the day, or when IT staff is unavailable, or???.
Create a batch file to do the same thing that any user can run!
Create your batch file like normal, and then use the following syntax to launch Powershell and run the command to restart services.
powershell.exe -command Restart-Service -InputObject $(Get-Service -Computer SERVERNAME -Name Service1,Service2,Service3);
NOTE: You need the semi-colon on the end of the line. If your script has multiple lines, you will need a semi colon at the end of each one.
Run the command:
Looks like this:
- ifconfig eth0 192.168.1.100 netmask 255.255.255.0 up
Then run the command below to verify the changes:
- ifconfig eth0
I had done a trial of the vKernel vOperations Suite, and it installs itself as a plugin for vCenter. When the trial was finished and I uninstalled it, it was still being listed as available plugins in vCenter, but of course it couldn’t find it. Below are instructions for how to remove a vCenter Plugin from this list after it has already been uninstalled but is still showing up.
Browse to http://vcenter_ip_or_servername/mob
Click Extension Manager
In the Properties Pane, identify the values extension list that you are trying to delete. Copy the information between the quotes. As an example, if you had already uninstalled the VMWare Syslog from the vCenter Server, but it was still showing up in available plugins, you would copy the “com.vmware.syslog” string (without the quotes).
In the Methods Pane, click UnregisterExtension. A new window will open.
In the Value field, copy and paste (or type) the string value without the quotes that you need to delete and then click Invoke Method. Close the screen afterwards.
Refresh the Extension Manager screen and your plugin will be gone.
Close and reopen vCenter to verify that the plugin is no longer listed.
This is the error message I received on my Exchange 2010 SP1 Server when creating a new mailbox database:
Microsoft Exchange Error
Failed to mount database ‘DBNAME’.
Couldn’t mount the database that you specified. Specified database: DBNAME; Error code: An Active Manager operation failed. Error: The database action failed. Error: Operation failed with message: MapiExceptionNotFound: Unable to mount database. (hr=0x8004010f, ec=-2147221233)
. [Database: DBNAME, Server: SERVERNAME.DOMAIN.COM].
An Active Manager operation failed. Error: The database action failed. Error: Operation failed with message: MapiExceptionNotFound: Unable to mount database. (hr=0x8004010f, ec=-2147221233)
. [ Database: DBNAME, Server: SERVERNAME.DOMAIN.COM]
An Active Manager operation failed. Error: Operation failed with message: MapiExceptionNotFound: Unable to mount database. (hr=0x8004010f, ec=-2147221233)
. [ Server: SERVERNAME.DOMAIN.COM]
MapiExceptionNotFound: Unable to mount database. (hr=0x8004010f, ec=-2147221233)
To resolve the issue I ran the command below in Powershell:
- Set-ADServerSettings -PreferredServer
Also, it never hurts to check the following while you are at it. It seems to also resolve the issue.
- Open EMC and right-click on “Organization Configuration”. Choose “Modify Configuration Domain Controller”.
- Specify the domain and the DC.
- Open EMC and right-click on “Recipient Configuration”. Choose “Modify Recipient Scope”.
- Specify the global catalog server. Make sure it is the same as the chosen DC.
For my own reference (since I spent 30 minutes figuring this out and couldn’t find it documented anywhere) and to hopefully save someone else time.
After installing AD Certificate Services Web Enrollment, you need a URL to go to request and download certificates. But, what is that default URL?
Where SERVERNAME is where the AD CS Web Enrollment is installed.