Topics and problems related specifically to Windows PowerShell 2.0. PowerShell 2.0 shipped with the releases of Windows 7 and Windows Server 2008 R2. For general PowerShell topics, use the `PowerShell` tag.

learn more… | top users | synonyms

0
votes
0answers
4 views

Disabled ActiveDirectory Users from specific date with exclude list

i wrote a script that gonna disabled old users... and i need to do an exclude list to it... the exclude list should be .csv, with 3 columns "Name","SamaccountName","Reason"... i'm kind of stuck with ...
0
votes
0answers
3 views

remote task scheduling on windows 8

I am trying to schedule a task on windows 8 machine remotely from a windows 7 machine. I am executing the following command in powershell : schtasks /S "WIN8MACHINE" /U "Administrator" /P "PASSWORD" ...
0
votes
1answer
21 views

Powershell - How to use result of one WMI query in another WMI query?

Trying to list the user permissions of shares on a server, where the share's path has a common file path element in it. I have a script that successfully uses the Win32_LogicalShareSecuritySetting ...
0
votes
0answers
7 views

How to prevent ADODB.Connection pooling?

I'm using Powershell v2.0, question is in the title. I'm having to use the old school ADOB.Connection (not the OLEDB provider) to open a Jet DB file (.mdb). The reason is simple, the ...
0
votes
1answer
15 views

I don't understand why Select-String isn't matching this

$lines = '<string>D:\home\bob\utility.mdb</string>' [String[]]$varr = $lines | Select-String -AllMatches -Pattern "<string>*.mdb" | Select-Object -ExpandProperty Matches | ...
0
votes
1answer
20 views

Extend PowerShell to search/replace and perform on all files in directory?

I have a PowerShell script that converts a CSV file to JSON. I would like to do a search/replace on the JSON file after for "NULL" to null. Also do to run this script against all CSV files in the ...
0
votes
1answer
8 views

read file into line delimeted array

Powershell 2.0, using the 32-bit version. I'm running it via the PowerGUI Script Editor. Everything online seems to think that Get-Content returns the file as an array, however. $lines = ...
0
votes
1answer
24 views

Copying 8 files from a folder to 40 other subfolders

i tried to make a script which copies all (8 files) files from one folder into a specific subfolder of around ~40 folders... i start like this with the * to copy all files out of that folder. But of ...
0
votes
0answers
11 views

get reference to list box in excel 2010 from powershell v2

I have a spreadsheet with a list box control which must have it's value set from powershell v2 How can I get a reference to the list box from the Worksheet com object?
0
votes
1answer
7 views

Enable-Psremoting remotely

i want to enable powershell remoting on other computer remotely . And remote computer require authentication. I tried to create a batch file which schedules a task executing Enable-Psremoting , ...
-3
votes
3answers
83 views

Search 1 string on 2 file by steps [on hold]

I'm trying to make this script and it has been total failure. I want to gather a string from an input box, search for that string in a text file 1. If it exists in text file 1, then take the result ...
-3
votes
0answers
19 views

select item from excel drop down powershell [on hold]

I need to chose an item from a drop down in an excel 2010 spread sheet using powershell v2 have been searching for hours any help greatly appreciated The drop down is of the forms control type. I ...
1
vote
1answer
33 views

Powershell - keep specific word in a string

I'm doing AD extract and I sort the field "distinguishedname" and I want to keep only a specific part of the value that represent the "parent OU" of the user itself. I'm running this command to do an ...
0
votes
0answers
20 views

Powershell - read list and output gwmi contents to separate file

I am trying to use WMI to get the hostname, IP and MAC address from all computers in the domain and store them in a text file. When I run my code, I receive the following error: gwmi : The RPC ...
1
vote
2answers
46 views

i want to get particular information from a text file using powershell

I have a log file which I extracted using get-eventlog cmdlet, here is an example of its output: index Time EntryType source InstanceID Message 000 xxxx ...

1 2 3 4 5 98
15 30 50 per page