Archive for the ‘Windows PowerShell Scripts’ Category
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 »
Writing an LDAP Search Filter
Thursday, April 10th, 2008 by Don Jones
http://confluence.atlassian.com/display/DEV/How+to+write+a+LDAP+search+filter is a great article on writing LDAP search filters.…   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 »
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 »










