Quantcast
Channel: Windows PowerShell forum
Browsing all 21975 articles
Browse latest View live

PowerShell Progress bar

How can I add a progress bar to the following script.  I'm trying to install all exe's in a directory.  I would like it to say installing 1 of 3 and % complete.  This is what I have. $folder =...

View Article


Capturing part of a path to a string

I need to capture the name of a folder that is one down from the root. I have been looking at various ways like using split-path and aregex but I cannot get anything to work reliably.The tricky part is...

View Article


Script to ping multiple hosts and return domain info to a txt or csv file

Hi,I wonder if anyone can help.  I need a script that will allow me to ping multiple hosts (all listed on seperate lines in a txt file) and return IP, server up\down and domain info to a txt or ideally...

View Article

Image may be NSFW.
Clik here to view.

Get Only Mailbox related Exchange LicenseOption

Hi,I am writing a script to get only the Exchange mailbox related licenses. I am using the following script to get all exchange related license options.PS C:\> Get-MsolAccountSku | foreach{...

View Article

Image may be NSFW.
Clik here to view.

how to fix this is who in the picture ?

I use this script in server 2008 R2 for Storing Windows Event Viewer Output in a SQL Server table with PowerShell :foreach ($server in Get-Content c:tempservers.txt) { $variable = ( Get-EventLog...

View Article


how to read from input file and pass to script

 How can I get rid of the hard coded PATH statement and feed script based upon text file input.   Input is contained in a file.. 'C:\cntprocess\   called sistemfolder.txt that has 2 fields folderthen...

View Article

Error: "File cannot be loaded because the execution of scripts is disabled on...

Hello,I'm executing powershell scripts from command prompt. I've changed my execution policy to Unrestricted. Also, Get-ExecutionPolicy is showing 'Unrestricted'. When i execute following error"File...

View Article

Telnet using powershell

I have list of servers, which should telnet to an ip address to port 12232, and display the result as Yes, IF the server can telnet to IP address, or NO, when it fails.How do I write a script in...

View Article


@{Add clears a multivalue attribute

I have some existing distribution lists that have Reject attributes set on them through the Exchange mgmt gui.  I want to be able to go through and append a global 'termed user' group to all DLs....

View Article


Start a process on a remote machine;

Hi,Currently we are running SQL Server queries/stored procedures etc from one central machine using start-job so it starts multiple process on the local machine connects to remote sql server machine...

View Article

Add Additional Aliases to existing Distribtion groups Exchange 2010

Hi Guys,I have a number of distribution lists that I need to add an additional email address to for a secondary domain.  I tried this -import-csv "D:\pst\company\import\distalias2.csv" | foreach...

View Article

General Questions about PowerShell

Some general question about PowerShell: 1. What is PowerShell Snap-ins? 2. Is it possible to create custom-made script code and apply as a module? It would be same as DLL file or similiar 3. Does it...

View Article

Set-ADUser from a CSV file

Hi GuysJust a quick question. We have an application that daily puts out all the users detailed info into a CSV file. I'm thinking about making a script that can cycle through all the users and compare...

View Article


Image may be NSFW.
Clik here to view.

Monitoring a remote service, then starting and sending notfification

0 Hi- I am a PS newbie so forgive me if this has been answered. We are migrating to SCOM2012 but have 1 2000 server that needs 1 service running on it. Since SCOM2012 can't monitor 2000 servers I need...

View Article

Add Computers to Security Group Based on OU

Good Afternoon:  I have CMD-let / scheduled task that runs and basically adds all machines in an OU to a specified security group.  Below is the output.import-module ActiveDirectory;Get-ADComputer...

View Article


Remotely running a scheduled task

Hello, I am trying to design a script to remotely run the shutdown.exe /r task on 8 different machines.  I am using an array that holds the names of each machine, and then applying a for loop to...

View Article

Rollback IE 11

I am hoping to learn how I canA. Discover all workstations in my domain that are at version 11 of IEB. Utilize a script or GPO to uninstall the IE11 and have IE revert back to previous...

View Article


how to export csv without doublequote

I ran the following comandls |export-csv "d:\a.csv"The result is like the following, every field is double quoted, is there any way to not export double quote. Currently the silly approach I used is to...

View Article

Powershell code to implement the uudecode command line utility

Unix has had a utility named uudecode.  For example see this webpage:http://www.lehman.cuny.edu/cgi-bin/man-cgi?uuencode+1I have coded some PowerShell scripts that depend on a uudecode.exe utility that...

View Article

Extract a string after slash/character

Hi ... I am new to regular expressions and hoping someone can give me assistance with extracting a string after \ character.The total string is:  Amer/<userNameHere>  |  so for example:...

View Article
Browsing all 21975 articles
Browse latest View live


<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>