This is the first of an open-ended series of short tips on using PrimalScript. If you’ve ever used the product you know there are a wealth of features. I want to devote some blog time periodically to show-off some feature you may not have been aware of or a quick tip to use the product more efficiently. If you don’t have a copy of PrimalScript, you can download a 45 day evaluation copy from PrimalScript.com.
Category: Howto
More fun with services, PowerShell and ADSI
The other day I showed you how to use ADSI and PowerShell to manage services on remote computers. Since the ADSI type adapter is admittedly “kludgy” at times, I put together a script that you could use like a cmdlet to retrieve service information via ADSI.
Who owns the file?
Browsing through some forum or newsgroup recently I noticed that the task of getting or setting file or folder ownership is not trivial from a script. I put together a small COM component that does the trick and it is available for free from here: http://www.primalscript.com/Free_Tools/index.asp The usage is pretty simple and self explanatory. Only […]
Managing Services with PowerShell and ADSI
In PowerShell v1.0, if you want to manage services on a remote computer, you likely used WMI and the Get-WMIObject cmdlet. But there is another solution using ADSI. If you use the WinNT provider, you can access all of the services on a remote machine in much the same way you would manage local users and groups. Let me show you.
New ActiveXPosh version
A new version of ActiveXPosh was uploaded to our server. You can download it from http://www.primalscript.com/Free_Tools/index.asp Aside from some minor fixes, it includes a new method on the interface called ‘GetValue’. With that function you can easily get the string value of some variable or property without going through the output buffer. An example would […]
Scripting Essentials
I wanted to make sure everybody knew about another site in the ScriptingAnswers.com family. We have another area we refer to as our Essentials site. Here we gather tips, best practices, sample scripts and more. Coverage includes not only PowerShell but VBScript as well. This is also where you’ll find conference slide decks and demo […]
WBEMTest Demo
If you’ve sat in on any of my WMI related classes or conference sessions, I know you’ve heard me talk about using WBEMTest to test WMI connectivity and your WMI queries. WBEMTest has been around as part of Microsoft operating systems for a long time but many administrators have never heard of it. If you are troubleshooting a WMI related script this is the first place you should go, especially when troubleshooting remote server connections and alternate credentials. If you can’t authenticate to the server using WBEMTest, your script is likely to fail as well. Usually if there is a connection error, the error message should lead you in the right direction.
You should also use WBEMTest to test and refine your query. Once you know it works, then copy and paste it into your script (VBScript or PowerShell or anything else for that matter). If you script still has a problem, it is likely not your WMI query because you’ve already verified it works.
I put together a short video demo on how to use WBEMTest. To start it, click Start – Run and type WBEMTEST. The video shows you the rest.
Wayne’s World of IT Revised
I’ve blogged in the past about Wayne Martin and his outstanding list of command line tips. These are one line commands, some complex some simple, that you can use to accomplish a wide range of task. The overall number of tips is to 425 and Wayne recently reorganized them into 7 categories to make it easier for people to digest. There’s very little scripting with any of these commands. Most use native or freely available command line tools. But because they are executed from a command line you could incorporate them into a script. I encourage you to check them out.
Managing Active Directory with Windows PowerShell – IN PRINT!
Yes, its finally true. You can finally get your hands on Managing Active Directory with Windows PowerShell: TFM. The book is being printed so you can get your copy today. You can order it today at ScriptingOutpost.com in both print and ebook format. Or if you prefer the best of both worlds get both as a bundle.
What’s in a manifest?
The last blog entry about script packages and elevation prompted Don Jones to ask if we consider adding a template to PrimalScript or even a manifest builder. Truth is, manifests are so simple that this hardly seems necessary. Here is the manifest file I usually use as a template: ftp://ftp.sapien.com/manifest.xml There really are only three […]