Skip to main content

All Questions

Tagged with
0 votes
1 answer
804 views

Powershell File Creation - Date Created Weird

Creating a script for work, and they want the logs to roll over for 7 days. For example, todays log is xxxxx.log, and tomorrow that will get renamed to xxxxx.01 and the next day xxxxx.02. Something ...
Freddyg103's user avatar
1 vote
2 answers
1k views

Get-CimInstance not working when run from Scheduled Task

I have a Powershell script that exports a list of all the services on my local computer using the following command: Get-CimInstance win32_service | Export-Csv $PSScriptRoot\Local\services.csv It ...
mwolfe02's user avatar
  • 455
0 votes
1 answer
1k views

Script to look for specific folder names, then copy contents to destination path

I'm looking for some help with finding a script, or getting a starting point, as i'm a bit new to scripting. Basically what i'm trying to achieve is the following. A specific folder name, lets call ...
Nick Nikitkin's user avatar
5 votes
1 answer
18k views

Is it possible to install PowerShell 3 on a Windows Server 2003 or 2003 R2?

On a Windows Server 2003 rig (which already has .NET 4 but no 4.5 on it) that is to be expired before the end of the year, I'd like to run a few PowerShell 3 scripts on a scheduled base as the scripts ...
Jeroen Wiert Pluimers's user avatar
0 votes
1 answer
2k views

PowerShell Get ACL For Folders In A Text File

I have a text file with the exact paths of the folders that I want to get permission information from, and I am trying to use PowerShell to get the information from each folder. I want to add the ...
The Woo's user avatar
  • 477
0 votes
2 answers
2k views

Why does running Powershell script line by line work, but the same thru executing script file - does not?

In Windows 7 Prof, executing in Windows Powershell_ISE (as administrator) the Powershell (ver. 3) commands produces expected result (of adding a domain user to local/machine Administrators group) but ...
Fulproof's user avatar
  • 101
9 votes
2 answers
22k views

Remote powershell permissions restricted to machine

I am unable to execute powershell scripts on a remote server, but only on my current machine - please help. Running the following script to give a list of a temp directory on the remote server works ...
WestDiscGolf's user avatar
283 votes
14 answers
374k views

Equivalent of Linux `touch` to create an empty file with PowerShell [duplicate]

Is there an equivalent of touch in PowerShell? For instance, in Linux I can create a new empty file by invoking: touch filename On Windows this is pretty awkward -- usually I just open a new instance ...
jsalonen's user avatar
  • 9,111
355 votes
12 answers
625k views

Native alternative to wget in Windows PowerShell?

I know I can download and install the aformentioned library (wget for Windows), but my question is this: In Windows PowerShell, is there a native alternative to wget? I need wget simply to retrieve ...
jsalonen's user avatar
  • 9,111