Browse CLASSROOM TRAINING REGISTER for classroom training CONTACT us

SAPIEN Solutions

SAPIEN homepage
PrimalScript script editor+ide
PrimalScope script debugger
Free Tools script utilities
SAPIEN Press tech books
ScriptingAnswers.com learn+share
ScriptingOutpost.com online store
Blog.Sapien.com official blog
Contact Us

 

Posts Tagged ‘powershell’

WinConnections Orlando 2008 PowerShell Demos

Friday, May 9th, 2008 by Jeffery Hicks
These are my conference demos from WinConnections Orlando 2008. My sessions were all on PowerShell: Managing Active Directory with PowerShell Managing Servers and Desktops with PowerShell and WMI Powershell and Windows Server 2008 Read the examples thoroughly and test in a non-production environment. If you have questions, please post in…   More »

Custom Objects Example

Wednesday, April 9th, 2008 by Don Jones
We've long been advocates of outputting objects, rather than text, and of keeping individual functions very single-task-specific. Here's an ultimate example of these two philosophies: The first function, Get-DriveInventory, emits custom "drive inventory objects" rather than text. The second, Write-DriveInventory, takes these objects and writes their properties to a pre-designed…   More »

TechMentor 2008 San Francisco - Auditing Examples

Tuesday, March 25th, 2008 by Don Jones
This are examples from Don's "Pass Your Next Audit By Using Windows PowerShell" session. They're also great examples of how to use filtering functions and custom objects to produce flexible, customized output with Windows PowerShell. Auditing with PowerShell Examples  …   More »

Why does Select-Object take so long to keep the -first objects?

Friday, March 14th, 2008 by Don Jones
There's recently been a big discussion on the PowerShell MVP mailing list about Select-Object and its -first parameter, which instructs it to only keep the first "x" objects it's given. The discussion basically goes like this: 1..10000 | select -first 10 In this, a collection of objects numbering 1 to…   More »

How do I sign a Windows PowerShell script?

Thursday, February 21st, 2008 by Don Jones
 First you'll need a code-signing certificate. If you purchase one, you'll be looking for a "Class III" digital certificate of the "Microsoft Authenticode" variety. This will often come in two parts: An SPC file, which is the Software Publishing Certificate, and a PVK file, which is the corresponding private key.…   More »

Targeting a list of names

Friday, February 15th, 2008 by Essentials Administrator
 This script assumes you have a text file listing one name per line - could be a computer name or a user name. In the example, which uses WMI, it's a computer name, and the script performs the same operation against each name. There are actually simpler ways, or at…   More »

Writing debug information to an IE window

Friday, February 15th, 2008 by Essentials Administrator
This is a trick I've used a lot in VBScript - writing debug messages to a browser window. It isn't necessary if you use an editor like PrimalScript, which redirects Write-Debug output to another pane for you. But if you're working in Notepad or something, this can be a good…   More »

WMI and alternate credentials

Friday, February 15th, 2008 by Essentials Administrator
 Here's an example of using PowerShell to connect to WMI on a remote computer using alternate credentials. Keep in mind that WMI itself doesn't permit alternate credentials for local connections.   # # ScriptingAnswers.com Essentials # copyright 2006 SAPIEN Technologies, Inc. # # Using alternate credentials with WMI # #…   More »

ADUC GUI to ADSI Mappings

Friday, February 15th, 2008 by Essentials Administrator
 Although ADSI Scripting: TFM has a more complete cross-reference, this one's online and free: It shows the basic dialog boxes for AD Users & Computers, and provides the attribute name underneath the various text boxes and check boxes. So if you know how to change something in the GUI, this…   More »


Entries (RSS) and Comments (RSS).