With service build 569 of PrimalScript 2007 we added a COM object that makes it easier to deal with CSV (comma separated values) data and/or files.
While browsing through posts at ScriptingAnswers.com and some of Microsoft’s scripting related newsgroups I…
Read More
While developing a COM object for scripting use I wanted to provide a VBScript sample as well as a PowerShell sample.
While creating the PowerShell sample I received an unexpected error message when setting a property value. Some quick review…
Read More
One of the last tasks for the Active Directory Powershell book was to assemble all the script samples. When the book is available you’ll be able to download a zip file from SAPIENPress.com. One thing I wanted to do was…
Read More
As of August 1st 2008 every CD of PrimalScript 2007 Enterprise shipped will include a copy of our PowerShell 101 Class-On-Disc.
To find out more about this title please look here: PowerShell 101
If you already own PrimalScript 2007 Enterprise…
Read More
A few weeks ago I posted an entry on creating customized debug messages that you can use in your scripting. After some more testing and tweaking I revised and renamed the function. Write-DebugMessage can now be used within your script…
Read More
The other day I posted a VBS function for getting drive utilization. It seems only fair to give PowerShell a chance to play.
1: Function Get-Utilization {
2: Param([string]$computername=$env:computername,
3: [string]$ID="C:"
4: )
5:
6: #suppress errors messages
7: $errorActionPreference="silentlycontinue"…
Read More
Here’s another recent topic from the ScriptingAnswers.com forums which I thought I’d share. The forum members wanted to delete files if the drive utilization exceeded a certain threshold. Using Windows Management Instrumentation (WMI) with VBScript I came up with something…
Read More
In a recent PowerShell ScriptingAnswers.com post, a member was asking about variables and whether they were “live” or linked to an actual object.The answer is “Yes and No, depending…” For example, consider this expression:
PS C:\> $s=get-service wsearch
The $s…
Read More
In my script and function development, I often add the line $DebugPreference="SilentlyContinue" to the beginning of my code. Throughout the script I add lines using Write-Debug that tell me what the script is doing or the value of a particular…
Read More
Hal Rottenberg has put together a very nice set of functions for exporting and importing PSCredential to a file. The export function takes a PSCredential and serializes it to an XML file. The corresponding import function reconstitutes the PSCredential to…
Read More