Quantcast
Channel: PowerShell General
Browsing all 10624 articles
Browse latest View live

How to exclude an OU during a search?

I have this code that works to move old computer accounts to an inactive OU.   $Inactive_computer_OU = 'OU=InactiveComputers,DC=Acme,DC=com'$sourceOU =...

View Article


Make `n to create a new line for redirected output

HelloI have a string as below:$String = "Test1`nTest2"While printing to screen, I have 2 lines. But on redirection I get one line.Code: $String >> Log.logOutput for Log.log: Test1Test2How can I...

View Article


Connect PowerShell to Oracle 7.3

I need to connect from PowerShell V2 or V3 to an old Oracle DB V7.3.Can I do this and what do I need?Thank You!!--Goo

View Article

Replace output csv from commas to zero

I have a script that outputs csv with number of user per app122,22,3,4,6Then it imported into sql table which works If the output csv contains commas instead of a number if fails because the sql table...

View Article

Run a PowerShell Command as a different user not the script

I am building a GUI to get-GPResulantSetOfPolicyI want to open the GUI as myself but run the following command as a User Account that is in the Domain Admins group. Here is my cmd for getting the...

View Article


Compare Properties of an MP3

HelloI'm new to powershell, and I'm looking for an way to automate the following.I have 2 folders with mp3s (Folder1: "C:\MP3WithComments") and (Folder2:"C:\MP3WithoutComments"). As you can probably...

View Article

Get IE Settings?

On a Windows 7 workstation if you go into Control Panel there is of course the Internet Options Icon.  If you double click on this icon you see all sorts of Internet Explorer information.  Using...

View Article

Image may be NSFW.
Clik here to view.

Error "Split-Path : Cannot bind argument to parameter 'Path' because it is...

Hello,In C:\Users\Powershell folder, I a a script as ZZZ_Test. This script writes script's directory as below:$MyDirectory = (Split-Path $script:MyInvocation.MyCommand.Path) + "\""---> " +...

View Article


replacing file path

Hi, I am new to PowerShell.I have a .confi (XML) file in UTF-16 unicode with over 100 lines. I need to find replace the some tags where file path is incorrect.  I am able to find the file path store it...

View Article


Param cmdletbinding() full parameters list

Hi,Can anyone please give me the list of parameters in param, After we specify cmdletbinding(). As of now, I know only 4 parameters. please have a look at the below example.[CmdletBinding()]Param(...

View Article

Executing (calling) powershell commands through Control-M

Hello,I am new to usage of powershell.  I am trying to execute (call) a powershell script through the BMC Control-M batch processing program via a Command Line.The command I am using is: powershell...

View Article

Image may be NSFW.
Clik here to view.

Logging user/machine and session information

Hi all,Firstly, I just wanted to say I'm an absolute Powershell newbie, and secondly that this site is a great repository of knowledge by those way smarter than me! Anyway, I am a Network Admin at a...

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


Windows PowerShell 3.0 language specification available for download

Microsoft released Windows PowerShell 3.0 Language specification to the public. This is a 334 pages of documentation and has tons of information on how the language is implemented. This specification...

View Article

PowerShell 3's PSDrive Persistence

One of the frustrations for many PowerShell beginners is how PSDrives correlate to drives that are visible in Windows Explorer. In PowerShell 2, you could add a new PSDrive, say to a network share, but...

View Article


PowerShell 3 Web of Wow, Part 1

When PowerShell 3 came out along with Windows Server 2012 and Windows 8, you probably heard a lot of talk about the cloud and how to manage within it. In this week's lesson we'll start a short series...

View Article

How to Export and Import PowerShell Scheduled Jobs

In previous articles I’ve written about how to export scheduled tasks and import scheduled tasks in PowerShell. In those articles, I made mention about the potential downside to exporting and importing...

View Article


PowerShell v3 New Features

Sharpen your PowerShell skills and get a jumpstart on the features of version 3.0 in this advanced PowerShell training by MVP Jeff Hicks. This course will give you a thorough overview of shell,...

View Article

Windows PowerShell 3.0 SDK Sample Pack

We're pleased to announce the availability of the Windows PowerShell 3.0 SDK Sample Pack. For Windows PowerShell 3.0, the SDK samples work a little differently than in previous releases of Windows...

View Article

Conversion Issues Upgrading to PowerShell 3.0

This post probably has a small audience, but there were a handful of conversion issues I ran into when I upgraded to PowerShell 3.0. It was difficult finding posts related to the errors I encountered,...

View Article
Browsing all 10624 articles
Browse latest View live