Need to automate a telnet session
I am very new to powershell(only started yesterday) I downloaded a piece of code which connected via telnet to an IP, which I modified to fit my needs. It connects fine, but when it asks for password,...
View ArticleWSUS Powershell cmdlet
HiIm trying to run the following script copied from TechNet. When I do it works just as it is supposed to, but it doesn't approve updates with license agreements that need to be accepted. Is there a...
View ArticleDynamically split objects into smaller groups
Scenario is as follows:Pass in large number of systems (say 1000), break into same size groups (say 100), execute a background process for each group to conduct a WMI query, so I end up in this example...
View ArticleconvertFrom-Json is not recognized as the name of a cmdlet
I'm trying to use the convertfrom-json cmdlet and when I attempt to use it on windows 7 in powershell, i get that it is not recognized. I have read:The Microsoft.PowerShell.Utility module is installed...
View ArticleMicrosoft CRM Snapin Errors
On a server(2008R2) with CRM installed I do a add-pssnapin microsoft.crm.powershellEverything is great, but then on every get I try to doGet-CrmOrganization : The remote server returned an error: (500)...
View ArticleI need my script to wait on a registry value to populate
I having an issue with a powershell script that is running a little to early. The script is suppose to read a registry value or attribute then map a printer. The script runs on startup and based on the...
View ArticleWorking with Modules
Dear All,I want to design a module where I want to use it in this way:import-module my_moduleIn the same console, later on, I use my_module and start using it. I have built a...
View ArticleUsing System.Windows.Window from PowerShell
HiI am playing with the recently blogged Lock-Screen function (Temporarily Locking the Screen). It is working fine in the ISE but I can't use it from the PowerShell console shell.I'm getting an error...
View ArticleNew PS user - selecting items from an array...
I have put together a script by pulling from various lines of scripts across the web. My goal is to search a txt file of computer names and then query these for the version of Internet Explorer they...
View ArticleHelp with a Script for Remote updates
Ok. So I know what I *Want* this thing to do, it just doesn't seem to want to listen to me.We have a Server infrastructure of about 20+ that are updated via SCCM and rebooted each week.What I would...
View ArticleCan I change the value of an object property within powershell pipe?
Hello I would like to know if you can alter an object property while stream the data through the pipe i.e: Import-Csv file.csv | Select-Object id,col | ForEach-Object { $_.col = "Test" } ?
View ArticleBest way to install roles and features in server 2008 r2
Hi All,I want to install below roles in server 2008 r2. I use import-module servermanager, add-windows feature myroles_and_features. Here are the roles and...
View ArticleLearning PS - this is what I want to do and below that is what I have- any...
List the last 50 entries in the System log using Get-WinEventOutput 2 blank linesList the last 50 entries in the Application log using Get-EventLog, sorting by IndexOutput 2 blank linesUsing pipes,...
View ArticleHow can I transfer a file via POST and Powershell?
HelloI have to upload a file via POST (HTTP) to a webserver and download it via Powershell.The Download with the command "System.Net.WebClient" works great, but I don't know how I can implement the...
View ArticleHow can I get my powershell script to terminate with a failure code without...
I'm trying to get my powershell script to exit with a fail status, but I want to suppress the write-error output. Can somebody help me terminate my script without this message? Thanks
View ArticleHelp loading contents of file in to multiple arrays...
In my latest pursuit, I'm attempting to use secedit.exe to dump out the local security config of a server and check the settings against a configuration checklist.So far, I can dump the text file using...
View ArticleNet Assemblies: Add-Type vs [System.Reflection.Assembly]::LoadFile() vs...
Hello,I'd like to ask you which of the options would you use to add NET assemblies to PowerShell? I know Add-Type and how it works, but according to Measure-Command, it takes a few more seconds...
View ArticleCustom Type for GetType().Name
I have a bunch of functions in which I create PSObjects and add members to them with the add-member cmdlet. What I want to do is provide a custom name for the objects that I create. I tried overriding...
View ArticleNeed a PowerShell Consultant
We are working on a special HP infrastructure project and are in need of a great PowerShell developer for 6-8 weeks.
View ArticleExtracting Cisco hardware data from Rancid
Hi all,I have extracted data from RANCID using egrep across the CVS to provide information on the device FDQN, Chassis Type, Serial No and the part number and serial numbers of any cards or slots...
View Article