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

I want to run a script on multiple servers(nearly 40-50 servers) parallely

I'm trying to execute an existing script on a remote server and capture the output in a local filefavorite$Username = "user"$Password = "Password" $servers = get-content "c:\temp\servers.txt" $sb =...

View Article


Linux data recovery

Linux is the backbone  of a family of operating systems. In a similar sense, Windows is a family of operating systems (2000, XP, Vista, etc). Some of the most popular operating systems in the Linux...

View Article


Last Windows Update except DefinitionUpdate for Microsoft Endpoint Protection

Heres the script $objSession = New-Object -com "Microsoft.Update.Session"$objSearcher= $objSession.CreateUpdateSearcher()$colHistory = $objSearcher.QueryHistory(0, 1)Foreach($objEntry in $colHistory){...

View Article

Set StrictMode changes script behavior

The following script fails when I use the Set-StrictMode statement. Without the statement it works fine.Set-StrictMode -Version LatestParam(    [string]$ComputerName = 'localhost'    )Get-CimInstance...

View Article

Creating EXE Aliases in PowerShell

In PowerShell, an alias is a handy shortcut or command alternative. For example, instead of typing Get-ChildItem, you can type ls or dir. Aliases can act as a transition from other shells to PowerShell...

View Article


Run PowerShell on All Machines in Active Directory Group

Q: How can I run any PowerShell command on every machine in an Active Directory group?A: I wrote the following PowerShell code as a way to run any PowerShell command on every machine in an Active...

View Article

Looping a Foreach-Object

How do I get this script to loop through the ForEach-Object loop five times before it runs the line to copy the file? ($EXMBX has five entries) $Date=Get-Date -Format yyyyMMMMdd $file = New-Item -type...

View Article

Not getting all info from get-aduser command

I ran this command against an active AD user. get-aduser jacksos1It returned the following informationDistinguishedName : CN=Jackson\, Stanley,OU=MGH_Users,DC=Acme,DC=orgEnabled           :...

View Article


Trying to make a super robocopy!!!

I have been using robocopy to copy files from a lot of different places to one main storage so it can be backed up to tape.  Some of the data is very large, 2TB.  I noticed that when I run these batch...

View Article


How to redirect Powershell output from a script run by TaskScheduler and...

I have a powershell script which is invoked by the task scheduler. The task's definition also redirects the output using >> to a log file. The PowerShell script invokes a C# console program which...

View Article

christian louboutin sale 3xEn

One hundred Jungun down,ray ban wayfarer, Rao is the man playing a good physique boil children, this story also lost half of their lives. Moment, the penalty is completed, these officers are subject to...

View Article

sharepoint server database recovery

SharePoint Server data recovery software is the most remarkable database recovery software that has got an excellent ability to restore documents, files and websites from SharePoint databases. This...

View Article

Add use to local admin group

Hi,I'm trying to write a script which add user to local admin group.The problem is that I have user who are based in Poland, chain and so on.The current script I have works well if the user are in UK...

View Article


help on deleting files

hello All. I aint really a programmer, but I am assigned to do an automation piece. your expertise on powershell will greatly help me.Scenario:Need to delete files which are x no. of days old. Here's...

View Article

Simple outputting Array object??

Simple question, I think..  I have some IP addresses stored as objects in an array (these come from WMI queries)  but when I attempt to write them out I just get blanks;  Some examples below,  Can I...

View Article


Adding and setting properties of custom psobjects in a loop

I have multiple functions which contain statements like these:http://pastebin.com/skdH29iaThey work fine almost every time, but occasionally output errors  like:Property 'LogonName' cannot be found on...

View Article

Installing the BizTalkFactory PowerShell Provider on BizTalk 2013

As you may have read (source: QuickLearn), the BizTalkFacotory PowerShell Provider comes shipped with BizTalk 2013 as an “SDK Utility”:Read More

View Article


PowerShell Studio 2014: Find In Files

One of many new features of PowerShell Studio 2014 is the Find in Files tool. Find in Files allows you to search multiple files without having to open each file individually, as you would have done in...

View Article

Regex Pattern

Hi thereI'm trying to find all instances of the following types in my script below*Defender_**Midfielder_* *Winger_*How do i add the other 2 patterns as well into the script below and how do i evaluate...

View Article

Change AD attributes for users from Text

HelloI have two text files.  One contains username.  Another one contains the value that I want to change for according usern.username.txtuser1user2 employeeid.txt100200Here is my command to change the...

View Article
Browsing all 6937 articles
Browse latest View live