strange results with $foreach.MoveNext()
Hello All Can someone please help me with the following question please. I am having a difficult time with $foreach.MoveNext() If I do this cls$numbers = 1..10 foreach ($number in $numbers) {if...
View ArticlePowerShell v3.0 Export-Vm - no config.xml?
Problem: Running the "Export-VM -Name foo -Path D:\exports" command from the PowerShell v3.0 console does not produce a importable export. The Config.XML file is missing. Context: Hyper-V Server 2012...
View ArticleCheck SQL Server Virtual Log Files Using PowerShell
In a previous tip on Monitor Your SQL Server Virtual Log Files with Policy Based Management, we have seen how we can use Policy Based Management to monitor the number of virtual log files (VLFs) in our...
View ArticleAutomating PowerShell Reports, Part 1
I want to take a short break from my in-depth look at PowerShell-based Active Directory (AD) query tools and show you how to put some of that query power to work in a concrete way. You've already seen...
View ArticleAutomating PowerShell Reports, Part 2
In “Automating PowerShell Reports, Part 1," I introduced one of my favorite PowerShell cmdlets, send-mailmessage. It's a flexible tool that's essentially a command-line SMTP client, allowing you to...
View ArticleModify exchange mailbox across domains
Our Exchange servers exist in our corporate domain (east.example.com), but at our site, the AD accounts exist in our domain (west.example.com). Here is the command I am trying to run: get-mailbox...
View Articlea newbie asking for help
I am coming from another platform and another scripting language. I am 51 and do audio post production. Aside from getting the audio right, I need to manage files and folders. I need to create folders,...
View ArticlePolling performance monitor in a loop- all calls to get-counter following an...
I'm no expert in PS but I have found it very useful as glue logic to automate little things here and there. Recently, someone asked me if there was an easy way to poll multiple servers in a load...
View Articlelimitations get-childitem or get-wmiobject
For quit some time I want to search very large fileservers in a cluster with filepaths that exceed 260 characters for certain file extension. I have tried get-childitem and -include -filter etc but it...
View ArticleWhat it actually means? ($user in $users)
1- Import-Module activedirectory 2- $users =Import-Csv 'C:\Testuser.csv' 3- Foreach ($user in $users) { 4- $filter = "name -like '$($user.name)'" 5- $pwd = ConvertTo-SecureString "$($user.pwd)"...
View ArticleWhat's In Your Pipeline?
If you've been reading Prof. PowerShell for any length of time you realize how much importance I place on the PowerShell pipeline. It's what makes PowerShell such a magnificent automation engine, once...
View Article2 Windows Server features worth a second look
Server Core and DirectAccess are underused by IT admins, but recent changes in Windows Server 2012 make them valuable. Read More
View Article7 ways Windows Server 2012 pays for itself
These new and improved 'supersaver' features offer the biggest return on your Windows Server 2012 investment. Read More
View ArticleHow to pass a variable from ssis 2008 process task to a powershell v1.0 scripts
Hello All, I am very new to powershell as a etl developer. I am trying to pass a file name stored as a variable in the ssis package to a "Process task" transformation. The process task is to execute...
View ArticleHow to Retrieve Uninstall Apps Remotely?
Hello there, I am a beginner at Powershell and I attempting to write a script to retrieve uninstall software. Here is what I have so far... CODE BEGINS...
View ArticleNeed help using Exchange commands on Windows powershell in windows 8?
I am running powershell in windows 8. Powershell came installed on the machine. I installed the Exchange Management tools on my machine. I have my powershell profile configured to load "add-pssnapin...
View ArticleProcess element in list one by one?
Hello, I have got a script that I would like to use for removing directories where their modified date is older than x number of days. I have managed to convert the DirectoryInfo object to a list of...
View ArticlePowershell Script Help Needed
Newbie here.. I am seeking a power shell script will do two things: 1. Move the contents of a given folder (example: c:\docs) from one server (Example: ServerA) to another server (ServerB) and then...
View ArticlePowerShell Saturday #003 | October 27, 2012 | Alpharetta, GA
PowerShell Saturday #003 will bring together 200 developers and IT professionals from Atlanta and the surrounding areas for a full day of intense learning and fun on October 27, 2012. With fifteen...
View ArticleCreate HTML Report of Facebook URLs using PowerShell
In this article we will explore a scenario of adding a custom User Profile property and generating a report based on it. The challenge here is that the report generation should be done with PowerShell...
View Article