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

Setting PowerShell Execution Policies

Microsoft doesn’t want any old tool to execute PowerShell scripts. But sometimes when we’re running a tool, we need the tool to be run in a way that violates the default execution policy. In order to...

View Article


My new favorite PowerShell cmdlet

OK, maybe not my favorite, and maybe I need to get out more but the more I learn about PowerShell the more excited I get. It is actually fun, not kidding. It’s reminiscent of that feeling I had 30...

View Article


Stealthy Crigent malware infects Word and Excel files

The ‘Crigent/Power Worm' virus, revealed by Trend Micro in a 27 March blog, uses several new techniques to conceal itself – including working solely through the Windows PowerShell scripting tool rather...

View Article

ISESteroids – A Revolutionary PowerShell ISE Add-On

If you love the built-in ISE editor that ships with PowerShell 3.0 and 4.0, but you were missing some professional editor capabilities, then ISESteroids add them for you. It is a commercial PowerShell...

View Article

Use PowerShell to Query WMI on Windows Servers

I recently needed to check and see whether a backup drive (which was just a 4TB USB drive) was plugged into a server. But the server had no GUI, so I had to use the command line. There was no drive...

View Article


Oracle ODBC connection using DSN with powershell

 Hi All,I want to establish a Oracle database connection using ODBC DSN. I have written the below code but i am getting error "Data source name not found and no default driver specified". Let me know...

View Article

PowerShell Validation

I have a script that will update computer Description in Active Directory. I would like to validate the AD description with the following information:BLDG #402, Rm GH123-1, GH1001-D234, 987-9876, SN...

View Article

Compare folders recursively, Remove dupes.. Log everything!

Hi All!I've been working on this script on and off, and I'm stuck!I have two folders: Dev and QAReady. Each of these folders has 3 txt files in the root, along with 7 sub folders that cant be deleted....

View Article


how to copy new and updated files to more than one location

My case is as below I had SourceFoler  = d:\temp\SourceFolderTargetFoler = d:\temp\TargetFolderOtherFolder = d:\DiffernceFolder I want to copy new and updated files from source folder to target...

View Article


Bulk Set Manager

Hi.I have this powershell script. For some reason it will change all other properties but Manager - and I cannot figure out why - any ideas?My csv contains Manager stated as SamAccountName.mport-Module...

View Article

Spliting input file by name of server names

Hello,i'm having a problem with creating of a script that would split my txt input to smaller files named by the server and sent every line from input to its corresponding file.My input look like this...

View Article

Warning over new Word, Excel malware

Infection could be easy to miss. System administrators are being warned about a new malware family that infects Microsoft Word and Excel files that could "creep under the radar". The ‘Crigent/Power...

View Article

PowerShell Remoting with Azure Windows VMs

These days, for all my demos at various events, I have been using Azure VMs extensively. If you have worked on creating these VMs using Azure PowerShell cmdlets, you will notice that they create a...

View Article


Rename-Item does not exist

Still working on photos and moving them when i have time. We have thousands of Photos that are a format used by ID card printers. When the extension is changed to .jpg they work fine with our other...

View Article

Locate machines where a specific account is present

I need to find all machines where there is a local account named, say, 'John' and include its group memberships (specifically if the account is a member of Administrators and/or another group we...

View Article


Powershell script to move user to new OU

Currently I have a PowerShell script to create new users, modify settings and set a AD Group or disable the user.I receive my input file and at the end of line there is a code at tells the script what...

View Article

Sorting hash table problem

I have a hash table of hash tables$events = @{}I add systems $events += @{sys1=@{count1 = 3; count2 = 5}                                                sys2=@{count1 = 15; count2 = 10}} and so on for...

View Article


Extract a word from path

HI everybody, I try to extract a word from a path, such as \\192.168.6.5\rawdata$\192.168.1.78\Proton1\14GS000674\14GS000674_14A00240-4_ODTRC_PRO-106_20140401190103.fastaAnd that word I will use it in...

View Article

Copy Files and Folder to New Location

I am trying to copy certain files that fall within a specific date range to a different location.   The command I have works but dumps all the files in the root of the destination.  I am trying to get...

View Article

Ask PowerShell Who Hasn’t Changed Their Active Directory Passwords

You can use PowerShell to pretty much get anything you want out of Active Directory. Let’s say you want to see when the last time a user changed their password was. You can use the Get-ADUser...

View Article
Browsing all 6937 articles
Browse latest View live