Get-ADUser by email ignore case
Hi, I try to update AD user information. The unique identifier is email address. How can I get-aduser by email address but ignore case? The email addresses from the source file are upper cases, like...
View ArticleConverted ps1 script to exe using Make-Ps1ExeWrapperWithArgs.ps1 by Keith Hill
I converted my powershell script to exe using the Make-Ps1ExeWrapperWithArgs.ps1 script by Keith Hill. My script is a complete GUI interface and so I do not need the powershell console window sitting...
View ArticleProblem with WinHttpRequestOption_SslErrorIgnoreFlags of COM Object...
Hi, I have problems writing a powershell script that will validate a https website. To make the script use the object WinHttp.WinHttpRequest.5.1. I need to define the...
View ArticleSetting Win7 Base configuration, is this doable with powershell?
Greetings all, I'm super new to powershell and haven't done much scripting, except for a little bit in Ubuntu 10.04 and RHEL 5.3. Long story short, I am working on a project in my company that may...
View ArticleHow to do a -like comparison with multiple things on the right side?
Am I forced to have a "x -like y1" -or "x -like y2" (and so on for all y's) or can I have a "smarter" "-x -like (y1 -or y2 -or ...)"? What I'm trying to do is use Get-WMIObject -Class...
View ArticleAudit ManagedFolderMailboxPolicy
I am working to find out which Exchange mailboxes are set to $null in the ManagedFolderMailboxPolicy. Currently I can find out the individual users policy by running the following command. Get-mailbox...
View ArticleSet-ADUser InvalidArgument exception when using variable in parameter
Hi, I try to use the following commands to Set-ADUser: $yPropertyName = "GivenName" set-aduser Di.Wu -$yPropertyName Didi but I get the error: Set-ADUser : A positional parameter cannot be found that...
View ArticleCan you enable local drives in a remote powershell session
Hi, When using a remote desktop connection on the destination machine you have avaialble to you the drives from the source machine so you can simply copy a file from source to destination. If you fire...
View ArticleCreating Custom Objects in Windows PowerShell – Part 1
By Jeff Hicks Whenever I’m writing, speaking about, or training someone on PowerShell, I always stress that it is “all about the objects." PowerShell is not about parsing or grep’ing text; it is about...
View ArticleUse PowerShell to create an HTML Server UPTIME report
This script illustrates using the ConvertTo-HTML cmdlet to create a server uptime report. To use this, make sure you add a path that is accessible to your system, and a listing of servers that you have...
View ArticleRemoting Agent – Powershell – Comments Sought
I want to develop a Powershell Agent / Service we install on all development and test machines to : - Download and install the latest version of our custom module- Provide script running capability...
View ArticleFrom (C#)ExpandoObject/ HashTable to PSObject
I wrote a C# DLL that I've imported into PowerShell via assembly. I'm working with dynamic objects inside my DLL and eventually return these in a PowerShell environment.The problem with these...
View ArticlePractical PowerShell for SQL Server Developers and DBAs – Part 2
Having shown just how useful PowerShell can be for DBAs in executing queries, Michael Sorens now takes us through navigating SQL Server space and finding meta-information - valuable information for...
View ArticlePractical PowerShell for SQL Server Developers and DBAs – Part 1
There is a lot of confusion amongst DBAs about using PowerShell due to existence the deprecated SQLPS mini-shell of SSMS and the newer SQLPS module. In a two-part article and wallchart, Michael...
View ArticleRename file to remove string between "_"
Hi, I have 100 files which contains "_". I need remove filename bits between "_". See below. Input: xxx_yyy_zzz.html aa_bb_cc.html Output: xxx_zzz.html aa_cc.html Any easy Powershell...
View ArticleAdding a New Member in Expand Property
Hi, When I run Get-Counter -ComputerName obiwan '\process(sqlservr*)\% processor time' -Continuous | select -ExpandProperty countersamples I am expanding the CounterSamples, and I need to add some...
View ArticleSend object to a job
If you run: PS> Start-Job -ScriptBlock {$txt = Read-Host; "$($txt) world"} How would I send a string to the job? The Job state is Blocked.
View ArticlePrint a Document to Network Printer and Delete
Hi, I am new to PowerShell and I am trying to write a script to Print a file (pdf) to the network printer and delete the file after printing. Any help is greately appreciated ! Thanks in advance!...
View ArticleInvoke-Command Mixed Domain Kerberos Versus NTLM
I have a ps1 script that dumps out local groups, with focus on administrators group. It uses Quest/Dell cmdlets to further dump out the contents of AD groups with the -indirect switch, which tells it...
View ArticleFind PowerShell scripts everywhere from one location with the Script Explorer...
Microsoft Script Explorer for Windows PowerShell (Release Candidate) helps scripters find Windows PowerShell scripts, snippets, modules, and how-to guidance in online repositories such as the TechNet...
View Article