ContributeMost Recent Contributions (feed)
- Email attachments
- 14 hours ago
-
All descriptions on the web which show how to do this so far have left the email attachment open which means if the script is continuing after the email and you wish to use the file you have attached you will not be able to as it will show as locked, use this example to close the attached file correctly using .Dispose()
- Set-WinSchedule
- 19 hours ago
-
Set-WinSchedule gives a GUI to select a schedule and schedules a task using schtasks. This is a beta. There are still a lot of features to implement. Please read through the synopsis->Description to see the list of features that I hope to get in a final release.
- Get-FtpList
- 23 hours ago
-
A function to get a file listing via FTP and parse it into objects.
The default “FtpWebResponse“http://msdn.microsoft.com/en-us/library/system.net.ftpwebresponse.aspx listing comes back in HTML format from my FTP server, and this function parses it into objects. However, the string parsing here may not work on the output of your FTP server (if so, please contribute by adding another set of parsing).
- Kill Outlook + CopyPST
- 25 hours ago
- Receive-Stream
- 25 hours ago
-
A very simple stream-reader implementation (with no error handling) suitable for simple interactive script task …
- partial application
- 39 hours ago
-
A proof of concept module implementing partial application (not currying) of functions and cmdlets in powershell. This is a functional language technique often used in languages like Haskell, ML etc.
- Untitled
- 47 hours ago
-
PowerCLI to upgrade guests tools, hardware and record to CSV
- Audit iPhone/Palm Users
- 3 days ago
-
This script is intended to use IIS logs to audit OWA/Activesync logs for syncing of mail from an iPhone or a palm device. This script is not perfect, nor the prettiest thing in the world but it works. It could be further added to parse for windows mobile devices. If it was really slick it would grab all the unique values in the DeviceType= portion and then automatically include all mobile types. You can email the results to yourself in $To varible.
- IP Scan/Local User admin
- 7 days ago
-
Where I work, we don’t use AD for roughly 30-60 servers. There are multiple identical local windows accounts on various servers, and when a person leaves the company, those accounts need to be deleted by hand. This group of scripts performs the following tasks:
1) Ping scans a range of IPs for responding hosts.
2) Takes those hosts and attempts to find the specified user
3) Optionally with the -delete flag, deletes the userThere’s three parts to this script. The trigger which is run from the console in the same directory as the finduser.ps1 and set-localaccount.ps1 files. Note that set-localaccount.ps1 is from powershell.nu, with some minor changes that allow the computername to passed as a parameter.
- Xml Module 4.3
- 7 days ago
-
My rewritten XML DSL now has better element name handling. See Blog Comments
New-XDocument no longer requires the “xe” command as long as the name of your XML Element doesn’t coincide with that of a PowerShell command (if it does, you need the “xe” on the front), and namespaces can be referred to by short name like dc:creator to keep things simple. Please review the examples on New-XDocument as this is a breaking change.
h4. The other functions round out the set of XML functionality (especially if you don’t have PSCX).
In particular, my Select-XML improves over the built-in Select-XML by leveraging Remove-XmlNamespace to provide a -RemoveNamespace parameter — if it’s supplied, all of the namespace declarations and prefixes are removed from all XML nodes (by an XSL transform) before searching (so you can actually find things, even with namespace-qualified xml). It is important to note that this means that the returned results will not have namespaces in them, even if the input XML did.
Also, only raw XmlNodes are returned from Select-Xml, so the output isn’t quite compatible with the built in Select-Xml — instead, it’s equivalent to using it the way I usually do:
Select-Xml ... | Select-Object -Expand NodeNew: Format-XML handles paths too :)
PowerShell Code Repository