PowerShell module management as a native feature is here!
PowerShellGet is a new way to discover, install, and update PowerShell Modules. New in WMF 5.0 Preview May 2014, PowerShellGet contains a set of cmdlets that enable users to interact with an online...
View ArticleDSC your workstation to test Windows PowerShell JEA in Azure.
Calling all Azure fans! Paid subscriptions, trial accounts, and MSDN SUBSCRIBERS. Don’t forget, if you have an MSDN subscription you have credit to use for testing in Azure!Read More
View ArticlePowershell CSV report usernames & Phone Numbers - but exclude area code?
HowdyI am working on a PowerShell report of user names, First, Last, and their phone number populated in AD.But the request is to take out the area code. That's not something I've done before, can...
View ArticlePowershell v.2.0 to v.3.0
Hi all, We recently updated one of our admin servers to WMI 3.0 and I'm finding that all my PS v.2.0 or earlier scripts are no longer working. Does anyone know how to write a command within the script...
View ArticleFinding exactly four numbers
Hello all, I have a CSV file that I want to find exactly four numbers. I do not want any numbers with any more or less than four numbers. I also do not want four numbers attached to any...
View ArticleCreate PowerShell Scripts Faster with the Script Browser and Analyzer
The Windows PowerShell Integrated Scripting Environment (ISE) is a useful tool for writing and testing scripts, and Microsoft has recently released a new ISE plugin that can help you develop PowerShell...
View Article[ordered] attribute to sort hast table, but what language construct is this?
I recently learnt that in order to sort a hastable, you need to prefix the construction of the hash with [ordered] (works for Powershell Version 3+).eg, to create an empty hash:$allCounts =...
View ArticleRun script against active directory group
Is there a way to invoke-command against an entire active directory group rather than having to write down each computer you want to run a script against?
View ArticleCitrix Provisioning Services PowerShell scripts
In the article series Unattended Installation Citrix Provisioning Services I already touched the PowerShell possibilities of PVS showing how to configure farm and server settings via PowerShell. In the...
View ArticleRemoting - Reporting on more than one service, sending email in html format
Hi - I have a script that works great and looks like this below. The problem is that I only want to know when anyone one of those services is stopped. Can anyone assist?[string]$Body=Invoke-Command...
View Articleformatting strings
I need to create a new registry key and I need double quotes to go around what I write to the registry. $Value="cscript c:\windows\MGH\Machine Printer.vbs" I need to write that to the registry but the...
View ArticleSecond-Hop CredSSP
I am having trouble getting the second-hop issue to work properly. I am trying to remote into Computer B from Computer A and then have Computer B install a program from Computer C. I enabled...
View ArticleQuestion on Inputs from .txt
Hi all, thanks for any help on this one, been scratching my head and google'ing but found nothing so far. (I'm new to powershell, so I might be looking in the wrong area)I have a normal .txt (no...
View ArticleComputer Field Missing
The results file doesnt put the computer name from the list. How do I define it in my script? $strMachineName = import-csv C:\temp\PCS.csv$results=foreach ($line in $strMachineName) { try {...
View Articleis it possible?
I want to create a directory with a .ps1 file and then copy the text of the file from the beginning and put it inside the created directory with a .ps1 extension. Something like...
View ArticleAccess Remotes Mapped Network Drive
I am working on a script that installs a .exe on to a remote computer. I have that working no problem. However, the program does not work correctly if I install the program directly off a file server....
View ArticleOutput name of file in Foreach-object command?
Good morning I feel like I've done all the most difficult bits of this so far, but am struggling with the basics :) I have a file with a date and time in seperate fields, I need to know how many rows...
View ArticleRemote Registry
I am trying to start the remote registry service for each PC to fetch a value from the registry but going nowhere. $Computers = import-csv C:\temp\PCs.csv$results=foreach ($Computer in $Computers)...
View Articlereplacing more than one character in a variable
Hi, I would think there's a way to replace more than one character with one replace but cannot find an example anywhere. $str1=' A_PROCESS_DATE, ACOUNTRY)' I want to get rid of ',' ')' and multiple...
View ArticleLab Ops – PowerShell 4 and KPI
In a Remote Desktop Services lab setup involving a gateway to allow connections to our virtual desktops over the internet we are going to need to use an SSL certificate to secure traffic between the...
View Article