Quantcast
Channel: PowerShell.com – PowerShell Scripts, Tips, Forums, and Resources
Browsing all 8583 articles
Browse latest View live

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 Article


Converted 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 Article


Problem 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 Article

Setting 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 Article

How 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 Article


Audit 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 Article

Set-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 Article

Can 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 Article


Creating 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 Article


Use 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 Article

Remoting 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 Article

Image may be NSFW.
Clik here to view.

From (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 Article

Practical 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 Article


Practical 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 Article

Rename 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 Article


Adding 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 Article

Send 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 Article


Print 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 Article

Invoke-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 Article

Find 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
Browsing all 8583 articles
Browse latest View live