Currently browsing category

Scripts, Page 3

FileFinder

Here’s a script playing around Get-ChildItem and Select-String. Searches files from various criterias (before a modification date, after a modification date, with …

Speeding up PowerShell startup

Jeffrey Snover [MSFT] has updated his Update-Gac script and yes it speeds up the start of the PowerShell console: Before running ‘update-Gac.ps1’ …

Create-Website

Question: What’s the best way to have standardized websites accross server(s)?
Answer: Using a script to create them! Thus, all websites will meet the same standards

In this example, the only mandatory parameter is the website display name. All others have default values, but the script will list them and ask confirmation before creating the website.
Furthermore, a selection of the IP address to use is required (yes, a webserver can have multiple IP address configured, I hope so by the way, at least two -one for the admin network-).

PowerShell Profile Example

Here’s an example (mine…) of a PowerShell profile First of all, if you don’t know about profile, you probably don’t have one; …

RPC-Ping

Test an RPC connection against one or more computer(s)

Send-MailForMe

Use Outlook to send a message from your mailbox in your name and updates the Outlook security settings if needed To be …

CleanUp-IISLogs

Find IIS logfiles location (WMI request on IISWebServerSetting class) and clean them: delete files older than x days and compress (without any …

Monitor-NIC

Monitors a NIC (DevideID 1 in this example) events (network cable unplugged, NIC disabled, etc.)

Monitor-Website

Monitors a website availability, integrity and response times by looking for a specific string on a page

Scroll to Top