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

[datetime]::ParseExact questions

So, i'm working with importing a csv file and the format of the one of the columns is 08/15/2013 11:00 So, I am just trying a few things with no success.. Format of column is 8/15/2013 8:38First, I...

View Article


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

System.Object[] as value in CSV

Hi all, i have this:Invoke-Command -ComputerName $i.computer -ScriptBlock { Get-Eventlog -LogName system   |  Where-Object {$_.EventID -eq "6008"}  }                                 if i write it out...

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


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

view remote and locatin 32bit performance counter

i have third party 32 application installed win 2008 R2 64bit.. when I run below command to see counters I get an error saying cann't find any performance counter sets..Get-Counter -ListSet es1* |...

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


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

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

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


check for service installed & get status, output report, almost there I think?

Howdy,I have been trying to get a script working to check for a single service and I'm getting stuck.  I have the script below which does get all services and I'm not far off, but I'm not sure how to...

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


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

powershell - Invoke-WebRequest - sourceforge urls/redirection/dynamic conten

Hallo,I try to use Invoke-WebRequest CmdLet in Powershell for downloading OpenOffie...

View Article


Verifying .NET usage

As part of a security audit, we need to:1.  Identify versions of .NET installd.2. Document any application which is using .NETThe guidelines provided to us for (1.) is to get the version of...

View Article

How to enumerate folders

I need to find out how many folders and files are on shared drive.     What I'd like is the same information you get when you "right click" a folder and pick Properties.   There you see this...

View Article

Change Local Password

I've Googled this and I've gotten tons of good hits.  But here is what our environment looks like. We have many Windows 2003 x86 & x86 servers.  We have many Windows 2008 R2 x64 servers.We have a...

View Article
Browsing all 10624 articles
Browse latest View live