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

Arrays with Holidays dates

have the ps script to verify he content of file Monday- Friday at 8:00 PM except holidays . If the word imported is not found in the text m-f I want to send an email.Need guidance on how to finish...

View Article


Retrieving firewall rules

Good morning, I'm trying to write a script that will allow me to retrieve the firewall rules an a given machine.  So far, I have tried using the netsh command and the HNetCfg.FwPolicy2 COM object, but...

View Article


Domain Controller extended attributes

I'm looking for a way to query all domain controllers in AD and return a specific attribute of each one. The attribute is the msDS-AdditionalDnsHostName which I can see through ADSIedit but I can't...

View Article

Fun with PowerShell's Out-GridView

Even though Windows PowerShell is primarily a console-based management engine, there are a few GUI bits you might want to take advantage of. One of them, which we've had since PowerShell 2 is...

View Article

Iterating objects in XML file and writing to a text file

HI All,I'm using the following script to try to get some output from an XML file concerning certain objects.  I use the following:[xml]$file = (Gc C:\users\me\doc.xml)foreach ($object in...

View Article


Using some sort of wildcards in replacement

Hi,I've got a script file to create a database as below.  It has strings like "N'S:\SQLData\" and "N'R:\SQLLogs\".  They may also look like: "N'T:\SQLData\" and "N'U:\SQLLogs\".    There are three of...

View Article

export certificate

I have used x509certificate2 to export certificate success, but i don't know where setting the "Personal Information Exchange-PKCS #12" option values using Powershell.  thanks very much! 

View Article

Compare files between 2 folders?

A company sales employee has left our company to go to a competitor. He has files in on his work laptop local hard drive.  We are trying to establish if there are any files that exist on his computer...

View Article


PowerShell 3.0 Remoting vs PS 2.0

For the past few months I've been using PowerShell 2.0 with Remoting set up through Group Policy. Recently, the Microsoft Management Framework 3.0 came out as an optional update. We sent that update to...

View Article


SSH PowerShell tricks with plink.exe

Recently I needed to perform some actions in PowerCLI from the ESXi Shell, as you may know there are currently no cmdlets from VMware to allow you to run shell commands but one option which is popular...

View Article

Getting eventlog for last 2 hours

Hi Expert,Iam newbie in powershell command, just want to ask what are the command to filter the event viewer eventlogs lets say for last 2 hours, 7 days etc..I tried this command {($_.TimeWritten).Date...

View Article

Problem with populating Excel Spread Sheet

HiI'm able to populate a spread sheet with the info from one array but not able to populate the info from the 2nd array:Code:$Servers = Get-Content .\EMA.txt$Dir1 =...

View Article

Set-WBSchedule not starting backup job

I found this Backup script posted by Augagneur Alexandre in the Powershell script repository, As I’m new to Powershell it looked like a good starting point for my needs. I modified it to accommodate my...

View Article


powershell cannot add more than one legend entry (series) to an excel chart

I have a problem adding more than one series aka legend entry to the seriescollection in excels chart object through powershell. The script creates an excel workbook with some data and a chart, the...

View Article

Capturing Text from a string into seperated names groups and outputing the...

Hello AllRecently I posted a quick example of "Checking how may times a substring appears in a string" using RegEx and the experts on the forum kindly following up with some examples using...

View Article


Passing data to/from an event action in script

I have just finished reading Learn Powershell Toolmaking in a Month of Lunches by Don and Jeff. Good book Don and Jeff, I picked up a few pointers that I can use in future scripts. I came across a...

View Article

Image may be NSFW.
Clik here to view.

Bug of Count when only 1 file

Hi, I have a a problem when i use this script :The count is false when only 1 file selected in folder C:\temp or other folder ???  Set-Variable -Name CER_FLD01 -Value "C:\temp" -Description "Temporary...

View Article


add computers to an ad group based on the members of another ad group

i hope the title of this post isnt very confusing... at work, all our computers have names based on the users username, and what i need to do is to update an AD group with the computernames belonging...

View Article

InfoWorld Recognizes Windows Server 2012 and Windows PowerShell in 2013...

Windows Server 2012 and Windows PowerShell have made IDG’s InfoWorld 2013 Technology of the Year Awards list, which recognizes the best products evaluated by the InfoWorld Test Center over the past...

View Article

How to look for a word/phrase in a string as long as another word/phrase does...

Normal 0 false false false EN-GB X-NONE X-NONEHelloJust thought I would post this as this was something I was previously stuck on (hope that's OK)If you want to match a word/phrase (any regex...

View Article
Browsing all 8583 articles
Browse latest View live