Stefan Stranger's Lifestream - tagged with tools http://www.stranger.nl/feed en-us http://blogs.law.harvard.edu/tech/rss Sweetcron stefan@stranger.nl Using PSExec to troubleshoot OpsMgr issues http://www.stranger.nl/items/view/6169

As you probably know OpsMgr quite some people use the local system account as Action Account. And if things are not working as expected you sometimes want to run a script or other actions under the local system account. I used to use the Task Scheduler to have scripts running under the Local System Account, but now I learned you can easily use the PSExec tool of SysInternals to do the same:-) How does this work? You can download the tool and install it on the systems you want to do your troubleshooting or just use the live share on http://live.sysinternals.com/ I created a quick and dirty PowerShell script that writes the owner of the PowerShell process to the PowerShell eventlog.

######################################################################################## # Write Owner of PowerShell Process to PowerShell Eventlog # Authors: Stefan Stranger # ScriptName: UserAccountDebugging.ps1 # v1.000 - 24/03/2010 - stefstr - initial sstranger's release (quick & dirty version)
######################################################################################## #Function Write-EventLog($Description) # #Writes Owner of PowerShell process to PowerShell Eventlog. ############################################################################################## function Write-EventLog($Description) {     $source = "PowerShell(PowerShell)"     [string]$type = "Information"     [int]$eventid = 999         if(![System.Diagnostics.EventLog]::SourceExists($source))         {             [System.Diagnostics.EventLog]::CreateEventSource($source,'Windows PowerShell')         }         else          {                 $log = New-Object System.Diagnostics.EventLog                  $log.set_log("Windows PowerShell")                  $log.set_source($source)                 $log.WriteEntry($Description,$type,$eventid)         }

} $processes = Get-WmiObject Win32_Process -Filter "name='powershell.exe'" $appendedprocesses = foreach ($process in $processes) {Add-Member -MemberType NoteProperty -Name Owner  -Value ($process.GetOwner().User) -InputObject $process -PassThru} $owners = ($appendedprocesses | select owner) foreach ($owner in $owners) {     $evtdescription = "PowerShell process is being run under the next account: "  + $owner.Owner     Write-EventLog $evtdescription }

Do whatever you wanted to do in the PowerShell script for your OpsMgr environent

Write-Host "Hello World" Save above script as UserAccountDebugging.ps1. If we run the above script with our logged on user account we get the next result:

Result in Eventviewer

    Now let’s start PSExec and run the PowerShell script with the local system account. Open Command prompt (as Administrator) and type: psexec –i –d –s powershell.exe

Now a new PowerShell Window will be opened as Local System Account.

Let’s now run the PowerShell script again and check the owner of the PowerShell process. Close all PowerShell sessions first ;-)

      Have fun using PSExec to debug OpsMgr Permissions issues with the local system account.

]]>
Wed, 24 Mar 2010 16:29:00 +0100 http://www.stranger.nl/items/view/6169
Anybody wants to test my OpsMgr MP Authoring PowerGUI PowerPack? http://www.stranger.nl/items/view/6134

I just created my first PowerGUI PowerPack which you can use together with the MP Authoring Console. Just like I blogged previously in my MP Authoring Helper PowerShell script here. Here a teaser screenshot of the PowerGUI PowerPack.   It’s just a first version I created and I would like to have it tested a little more before posting it on the PowerGUI PowerPack library. So if anybody is creating MP’s using the MP Authoring Console and wants to try to use the MP Authoring PowerPack within PowerGUI to help creating MP’s let me know via Twitter via a DM or use the contact form on my weblog and I’ll email my PowerPack for testing.

]]>
Mon, 15 Mar 2010 21:24:00 +0100 http://www.stranger.nl/items/view/6134
Updated version for Schedule Maintenance Mode Management Pack Guide on OpsManJam http://www.stranger.nl/items/view/5045

This management pack provides an automated method to schedule maintenance mode for a given set of Windows computers that are in a pre-defined set of groups and the associated rules to target against the groups.   Comments: Updates for this version: 1. Created two additional alert rules that notify the admin/operator if the script is unable to connect to the RMS or resolve the Group Name provided to the script. 2. Created a Troubleshooting section in the deployment guide. 3. Provided a statement regarding using this demo MP and Windows Cluster services 4. Provided additional guidance regarding the parameters that can be overridden. Contributor: Matt Goedtel Go and download at OpsManJam

]]>
Wed, 02 Dec 2009 11:06:00 +0100 http://www.stranger.nl/items/view/5045
Reblog: Tool: OpsMgr 2007 - RuntimeHealthExplorer http://www.stranger.nl/items/view/3266

Source: Notes on System Center Operations Manager I’ve updated my OpsMgr toolbox collection with a new tool from Marius Sutara called RuntimeHealthExplorer. This tool helps someone with investigation of health state issues. This is what Marius tells about this new OpsMgr tool. “Did you ever wonder what is the state of the instance as known to the runtime (health service) monitoring it? Did you believe that some state changes are unaccounted for? Did you see discrepancy in Health Explorer? I believe many of you may answer yes to one of these questions. Right now, there really is not a good guidance on how to troubleshoot state change problems, but since OpsMgr 2007 SP1 release, there was a way to at least display states of the monitors targeting the instance as recorded by runtime during state calculation. This led me to creation of the tool returning those states from runtime. It also provides visual comparison against “real” Health Explorer (states are returned from Ops DB) while integrated with OpsMgr console thru console task. This task targets instance of “HealthService” managed entity type. Tool uses Health Explorer like view of monitors for each active instance monitored by specific runtime. Following is a snapshot of the tool executed against my Root Management Server. Please observe that I created view listing all health service instances as well as console task associated with this type and accessible thru “Actions” pane.” Please read disclaimer before using.

]]>
Thu, 04 Jun 2009 20:51:00 +0200 http://www.stranger.nl/items/view/3266
Yet another Maintenance Mode GUI http://www.stranger.nl/items/view/2427

Today I got an email from Mark Wolzak with the question if I could give some exposure to his newly created Maintenance Mode GUI based on PowerShell and Windows Forms. At his company there are several people who have to perform maintenance tasks in the monitored environment. Not all of them are familiar with powershell or the operationsmanager console. And there will be probably more people who have the same issues at their company ;-) That’s why he combined the agent maintenance mode script and the group maintenance mode scripts in a graphical UI so that people no longer need to be familiar with powershell or the operations manager console. And now he is giving his solution to the community. So if you are interested. Take  a look at his website and download this new Maintenance Mode GUI based on PowerShell. And in case you want to create a Shortcut to this script you can take a look at the Windows Scripting Guys how to do that.

]]>
Thu, 26 Mar 2009 10:50:00 +0100 http://www.stranger.nl/items/view/2427
Reblog: OpsMgr Subscription enable\disable tool http://www.stranger.nl/items/view/1659

Source: Everything System Center Operations Manager 2007 Subscription Tool is a simple GUI based tool that lets you enable and disable all notification subscriptions. This tool is useful if you need to do some major maintenance such as patches, upgrading hardware, redoing AD integration roles, or fixing a major problem. The real power of the tool is when you want to re-enable the subscriptions.  The tool will automatically re-enable all subscriptions using “Send notifications for alerts Generated after the subscription is enabled”. This will save you from sending out huge alert storms your notification subscriptions.   Read more on source.

]]>
Tue, 20 Jan 2009 09:27:00 +0100 http://www.stranger.nl/items/view/1659
New OpsMgr Tool: GreenMachine (bulk reset health monitors) http://www.stranger.nl/items/view/1611

Source: TimHe's Blog of SMS SCCM SCOM MOM and SCE Tim Helton created a new OpsMgr utility that can be used to reset or recalculate all monitors for a single agent, or for all agents in your management group. Command line tool that facilitates bulk reset of health monitors. This can be very useful if you just had an event storm, and you want to reset everything back to "green". It also has the ability to identify "ManualReset" monitors, and reset or recalculate only them. It displays most of the same data as healthexplorer, as well as some additional information. Read more here.

]]>
Fri, 16 Jan 2009 09:18:00 +0100 http://www.stranger.nl/items/view/1611
Log Smith for Operations Manager http://www.stranger.nl/items/view/1553

Screenshot from Log Smith for Operations Manager

]]>
Mon, 12 Jan 2009 11:41:00 +0100 http://www.stranger.nl/items/view/1553
Update Toolbox: Log Smith for Operations Manager http://www.stranger.nl/items/view/1555

Source: System Center Forum Stefan Koell has released v1 of LogSmith for Operations Manager. LogSmith connects to your RMS and allows you to filter and sort events in the Operations Manager Event Log with ease - very nice for slicing and dicing the log quickly in large environments. I’ve updated my OpsMgr toolbox page with this latest tool. Read more on source. Haven’t tested it yet but it looks great! Update: Tested it and it's really great for OpsMgr Event log analyzing.

]]>
Mon, 12 Jan 2009 10:59:00 +0100 http://www.stranger.nl/items/view/1555
Secure Vantage ACS Resource Kit v1.1 http://www.stranger.nl/items/view/1239

Source: Secure Vantage Weblog Secure Vantage has released an update to the ACS Resource Kit for the community. The ACS Resource Kit now includes a revised version of the ACS Disk Planning Calculator originally posted on System Center Forum, new database utilities for ad-hoc queries and advanced grooming, plus the ACS Visio Stencils previously posted on our blog. For more information and to download the latest version of the ACS Resource Kit please visit http://www.securevantage.com/Products/ACSResourceKit.aspx ACS Resource Kit v1.1, Contents ACS Administrators Quick Reference – ACS newbie cheat sheet of common commands and configurations ACS Database and Disk Planning Calculator – preplan online, offline and archive storage needs plus disk requirements for the online audit database ACS Database Event Analysis ACS Summary Stats - XLS you can connect to ACS DB for event load analysis Query Active Partition for Event Counts Query Active Partition for Specific Events Windows Security Auditing Reference List – List of windows security events, settings and common configuration items for Windows XP, Vista, Windows Server 2003 & 2008 ACS Database Utilities Groom Specific Events from Audit Historical Database ACS Noise Filtering ACS Noise Filter Guide My Generic Filter – Sample noise filter Filter Setup Kit – Auto apply generic filter sets after ACS installation ACS Security Event Creation Testing – Scripts to create events for over 50 audit scenarios ACS Visio Stencils – Microsoft Office Visio Stencils of common ACS components

]]>
Sat, 20 Dec 2008 15:54:00 +0100 http://www.stranger.nl/items/view/1239
Answer: Operations Manager Authoring questions from SQLBatman http://www.stranger.nl/items/view/976

I saw a question of SQLBatman about Operations Manager Authoring. Here my attempt to answer those questions. Q: Referenced MP could not be found A: Search on your (Root) Management Server for *.mp files and copy all these files to one directory, like c:\Mps.  If your Authoring Console is on another machine then your (Root) Management Server copy these files to this machine. Add this directory to the References in Options Q: Create a custom attribute to the SQL DB Engine A: I only found that there are only two WMI Providers for Microsoft SQL Server 2005: WMI Provider for Configuration Management and WMI Provider for Server Events.     Source: Microsoft Windows PowerShell and SQL Server 2005 WMI Providers – Part 1 and Microsoft Windows PowerShell and SQL Server 2005 WMI Providers - Part 2     I’ve to look for more info about this question, but I at the moment I don’t have much time. But I’ll try to look into this soon.

]]>
Mon, 01 Dec 2008 16:26:00 +0100 http://www.stranger.nl/items/view/976
Getting Social. Using Twitter http://www.stranger.nl/items/view/543

Did you ever heard about Twitter? Twitter is a service for friends, family, and co–workers to communicate and stay connected through the exchange of quick, frequent answers to one simple question: What are you doing? More and more people in the System Center world are using Twitter as a means to communicate with each other. The latest in line is the The Manageability Team and according to J.C. Hornbeck why do they use Twitter?  “Well, the main reason is because while RSS and ATOM feeds are nice, with Twitter you can receive updates on your phone, via IM or on the web at places like Facebook.  It's much of the same information, it's just now you have more options on how you receive it." And what I would add is the great way you can respond to Tweets (messages on Twitter) by replying just like emails. I hope I’ve convinced you to start using Twitter. What are the steps to get started? Create a Twitter account here. Go and Follow people (following someone simply means receiving their Twitter updates) Who do I know which people I should follow? Here is a list of System Center/OpsMgr interested people I follow: rodtrent MSManageability MPNotifier opsmgr aquilaweb lazyindustries dani3l3 jpavleck wwwally bernardosanchez sstranger (me ;-)) Read and create Tweets. For reading and creating Tweets you can use the Twitter website or you can install different clients. Twadget — The Twitter Vista Sidebar Gadget Twhirl based on the Adobe AIR platform. And for Windows Mobile I use Tiny Twitter That’s it ;-) For more info on read the faq on Twitter. Most important twitter tip make sure that your Twitter settings say "get all @replies". Otherwise you only receive replies from people you follow. Warning! It’s addictive!

]]>
Fri, 07 Nov 2008 20:46:00 +0100 http://www.stranger.nl/items/view/543
New OpsMgr Tool: OpsMgr Alert Closer http://www.stranger.nl/items/view/477

Source: Pavleck.Net I updated my OpsMgr Toolbox with a new OpsMgr Tool called OpsMgr Alert Closer from Jeremy D. Pavleck. It takes 2 arguments - your RMS and an optional comment to insert when you resolve the alert. It then connects to the SDK service on the RMS, retrieves all open alerts, then resolves them. And yes, it does ask if you truly want to do this. It’s in beta, so Jeremy would love it if you all could test it out for him. This is a perfect solution to handle those pesky alert storms and another tool in the box. I’ve downloaded it and I’m going to test it today. You can download it via my OpsMgr Toolbox link.

]]>
Tue, 04 Nov 2008 09:40:00 +0100 http://www.stranger.nl/items/view/477
Another (web app) OpsMgr Maintenance Mode tool http://www.stranger.nl/items/view/407

Source: Steve Rachui’s Management blog – ConfigMgr/OpsMgr Steve wrote this tool because he has not seen anything that allows you to setup maintenance mode for remote systems without either having to logon to the RMS, use the operator console or install software/powershell on the remote systems.  This utility does a few things: Operates on both individual agents and groups Allows 'right now' configuration of maintenance mode Allows future scheduling of maintenance mode Displays systems currently in maintenance mode Tool is provided AS IS without warranty or support. Download on source.

]]>
Tue, 28 Oct 2008 09:52:00 +0100 http://www.stranger.nl/items/view/407
OpsMgr Remote Maintenance Mode Scheduler http://www.stranger.nl/items/view/268

Source: Everything System Center Operations Manager 2007 Tim McFadden has created a GUI based tool that lets administrators easily schedule maintenance mode for a server or group of servers inside System Center Operations Manager 2007. I’ve updated my toolbox with this great tool.

]]>
Mon, 06 Oct 2008 20:27:00 +0200 http://www.stranger.nl/items/view/268
Cleanup Tool for Operations Manager 2007 http://www.stranger.nl/items/view/197

Source: Walter Chomak's System Center Operations Manager 2007 Landing Zone I’ve updated the OpsMgr 2007 toolbox with Walter’s Cleanup Tool for Operations Manager 2007. This is a command-line utility that enables you to remove all the components of Operations Manager 2007 from a local computer in cases where the typical method of removing applications through Add or Remove Programs in Control Panel fails.

]]>
Thu, 02 Oct 2008 09:41:00 +0200 http://www.stranger.nl/items/view/197