Tagged Questions
PowerShell is a command prompt and a scripting environment designed for automating all Windows tasks, including system administration. It is ideally suited to automating tasks and leveraging all the power of the .net libraries.
0
votes
0answers
5 views
Get Powershell to search for blank cells from referenced row and not search the whole column
I would like to to search for blank cells in an Excel spreadsheet from a referenced row ($startRow) but instead Powershell searches the whole column (it starts at row 1).
How can I get it to start ...
0
votes
1answer
5 views
Powershell catch non-terminating errors WITH SilentlyContinue
I would like to catch and handle non-terminating errors but using -ErrorAction SilentlyContiune. I know i need to use -ErrorAction Stop in order to catch a non-terminating error. The problem with ...
0
votes
0answers
10 views
Get-ChildItem reports different value to Explorer
Fairly straight question, why does Get-ChildItem -recurse report a totally different number of folders to what Explorer reports?
For example I have a data drive with a substantial number of folders ...
0
votes
1answer
16 views
Writing Progress status
I have an NTFS Audit script and would like to add a basic progress bar. At the moment I have a function that I call like normal, with $i = 100 to indicate my max %. I run through the folders via
...
0
votes
0answers
29 views
How do I add multiple email addresses?
Below is the code i'm using. I'm unable to add multiple addresses using the powershell Emailaddresses parameter. The code works fine if I just put in one email address, but once I add two addresses ...
0
votes
1answer
15 views
A contribution to the TechNet Script Center Repository must contain a code snippet
I am unclear what the benefits of snippets are, but I was going to publish a script I wrote to TechNet. I finish all the entries and the page tells me: A contribution to the TechNet Script Center ...
0
votes
1answer
6 views
Invoke-WmiMethod not working with powershell pssession (invoke-command)
I am simply trying to execute a program on a remote machine using a pssession:
Invoke-Command -Session $session -ScriptBlock {cd c:\
powershell; Invoke-WmiMethod -path win32_process -name create ...
3
votes
3answers
29 views
Moving All Files with a Certain Name (Sorting) WINDOWS 8
Ok, so I have a large amount of ebooks and other files that I would like to sort into folders by Author name. The way I would normally do this in Linux will not work on my Windows 8 laptop. I've been ...
1
vote
1answer
24 views
Powershell regex works for one line, but not another
I'm running a powershell script to automate my build of my apk for an android project. I can pass in an app version code and name that my build script will use to replace those parameters in the ...
0
votes
0answers
10 views
How to improve TCPClient and Network Stream write performance
I have written a sample code as below using powershell
$objSyslogSender = New-Object PsObject
$objSyslogSender.PsObject.TypeNames.Insert(0, "SyslogSender")
$objSyslogSender | Add-Member -MemberType ...
0
votes
0answers
16 views
How to execute .ps1 files in Windows Azure Powershell
How to execute .ps1 files in windows Azure Powershell?
Does windows azure powershell use different extension for batch files?
I have tried .bat and .ps1 extensions without luck.
Note that I have ...
0
votes
1answer
16 views
PowerShell Split-Path does not work properly with IIS: drive qualifier
I am using PowerShell v3.0 and the IIS Administration Cmdlets to add and remove websites from my IIS 7 instance. I use Import-Module WebAdministration to make sure the IIS: drive is available, and I ...
-2
votes
0answers
24 views
PowerShell to List Parent Folders if a file or folder within has not been modified within the last 365 days
I am looking for a script to list only the Parent folder and only if no file or folder within the Parent folder has been modified within a certain number of days.
This will allow me to move these ...
0
votes
1answer
16 views
Install Windows 8 app (appx) remotely via PowerShell?
As the title says.
My scenario is I have some company app that want to install to all of machines in network.
I know that I can install .exe and .msi remotely from my machine to any machines in ...
1
vote
2answers
16 views
EntityFramework 6.0 CreateDatabaseIfNotExists Code first to create database
What am I doing wrong. I have got a user DbContext setup and working when I originally created the Code-First with powershell it all worked fine.
I implemented Database Initializer as expected on ...