PowerShell is Microsoft's new scripting language in 2006, and significantly upgraded in 2009. It allows interpreted scripts based on PowerShell cmdlets and .NET primitives.

learn more… | top users | synonyms (1)

2
votes
2answers
215 views

Passing arguments with variables in PowerShell to native application

Here is a part from my deployment automation script: $SVNEXE = "$env:ProgramFiles\TortoiseSVN\bin\svn.exe" foreach ($element in $commandstoken) { #$exportfile = ...
2
votes
4answers
124 views

Windows client powershell reporting

I'm working on trying to find a way to get our windows machines to report to a webpage with information about it's MAC address, computer name, currently logged in user, and ip address. I wrote a ...
1
vote
1answer
454 views

Is it possible to enable MSMQ from PowerShell on Windows 8?

Is it possible to enable MSMQ from PowerShell on Windows 8(.1)? If so, how does one do this?
0
votes
1answer
79 views

Change network used by cluster traffic types with powershell

I was reading this technet blog post about Windows HA cluster traffic types. It explains how to change the metrics of cluster traffic types with the cmdlets, but for settings like “Allow cluster ...
2
votes
0answers
96 views

Query performance counters from powershell

I am trying this script to query performance counters in different localized windows server versions. http://www.powershellmagazine.com/2013/07/19/querying-performance-counters-from-powershell/ ...
3
votes
1answer
81 views

PowerShell performance difference filter vs. function

I'm reading currently the Windows PowerShell 3.0 Step by Step book to get some more insights to PowerShell. On page 201 the author demonstrates that a filter is faster than the function with the same ...
2
votes
2answers
421 views

Editing/Setting Mime Types with Powershell?

So I was wondering if there is a specific way to change/edit a mime type in IIS 7.5 using powershell? So far I have come across solutions to add mimetypes such as: ...
2
votes
1answer
545 views

How can I set audit controls on files owned by TrustedInstaller using Powershell?

I am trying to set audit controls on a number of files (listed in ACLsWin.txt) located in \%Windows%\System32 (for example, aaclient.dll) using the following Powershell script: $FileList = ...
1
vote
1answer
60 views

How to get the MSOnlineBackup Cmdlets?

I am trying to manage the Azure Online Backup from PowerShell. There is a set of Cmdlets called MSOnlineBackup. See technet.microsoft.com/en-us/library/dn249523.aspx. When I try to run: ...
1
vote
2answers
96 views

Testing if Enter-PSSession is successful

Is there a way to test if Enter-PSSession is successful or if Enable-Remoting is already true? I don't need to be able to get into the machine itself, just a way to find out the return code. ...
3
votes
1answer
224 views

PowerShell remoting doesn't work if computer name contains dot

I have one system where I cannot connect to remote computer (or to itself remotely) using PowerShell when computer name contains dot. For example, this works: Enter-PSSession HostA -Credential ...
0
votes
0answers
98 views

Nmap XML parsing with Powershell

I am trying to parse the XML output from NMAP and isolate just the hostadddress and the vendor from the osmatch. I've actually done that with the following: select-xml -path nmap.xml -xpath ...
1
vote
1answer
58 views

Formatting tables

Through the use of several code snippets here and in VMware's website, I've created the following code that works: Connect-ViServer server $body = Get-Folder -name vm | Get-VM | Get-Snapshot | Select ...
0
votes
2answers
39 views

Snapshot Reporting via Email

I've got the current script that is supposed to log onto vsphere, get all snapshots that are over a week old, and email the results. Connect-ViServer server $weekOldSnapshots = ...
1
vote
1answer
121 views

Anyone found a way to access HP ILO via XML API from PowerShell?

Is there a way to use HP's XML API for ILO with PowerShell's Invoke-RestMethod and/or Invoke-WebRequest?
3
votes
3answers
1k views

Export all hosts from DNS Manager using Powershell

While I'm rather new to powerShell v3, there's some things I can do with it, however, one thing that has eluded me is how to pull all hosts listed in our DNS Manager (Server 2008 R2). I don't need to ...
3
votes
1answer
76 views

Launching Installer Via Powershell and WinRM and Nothing Happens

I'm currently working on a Powershell script to run some Microsoft Hotfix installers remotely on several Windows Server 2008 R2 servers that I manage. Basically, the script copies all the appropriate ...
1
vote
1answer
265 views

powershell Test-Cluster cmdlet: Access is denied. HRESULT: 0x80070005

I joined two hyper-v servers to a domain and added shared storage to both of them. From what I read I should be able to run the test-cluster cmdlet at this point for it to check the configuration, but ...
3
votes
1answer
186 views

Cmdlets for AD CS deployment: Install-ADcsCertificationAuthority cmdlet failing when attempting to install an offline policy CA

I installed an offline root CA without issue using this command: Install-ADcsCertificationAuthority ` -OverwriteExistingKey ` <#In the case of a re-installation#> ` ...
-1
votes
1answer
43 views

How to loop specific powershell script

I need to uninstall Java from several computers in my network. After almost all day of Googling it seems the best way to do this is with a Powershell script. I found one that I have tested on a few ...
0
votes
0answers
186 views

Packet drop monitoring on vmnic objects

I'm trying to create a script via PowerCLI that can monitor packet drops for vmnic objects. I was able to find online a version of the script that does exactly what I want for host servers, however ...
0
votes
1answer
45 views

Getting error while skipping the networkprofile check

I already made sure that I am running PS 2.0 on Windows 7 by running $PSVersionTable cmdlet. When i run Enable-PSRemoting -SkipNetworkProfileCheck I get following error:- Enable-PSRemoting: A ...
5
votes
1answer
217 views

Checking partition alignment with PowerCLI

I'm trying to verify that the file system partitions within each of the servers I'm working on are aligned correctly. I've got the following script that when I've tried running will either claim that ...
2
votes
1answer
155 views

powershell Read-host does not stop for input

I thought this would be fairly basic, but i'm stuck. I have 3 lines of powershell script in which I want to collect a mailbox name from user input, then create names based on that mailbox name. (later ...
0
votes
0answers
77 views

Powershell script to retrieve the same kind of info reported by DMDIAG for dynamic disks

This article about windows partition alignment explains that checking the alignment offset of dynamic disks can be done with the DMDIAG tool to get the "relative sectors" property. With dynamic ...
2
votes
1answer
999 views

Customizing powershell font face and size

We have a number of windows 2012 server core systems with powershell setup as the default shell using the following commands: $RegPath = ...
2
votes
2answers
558 views

How to collect Security Event Logs for a single category via Powershell

I am trying to write a script which collects security log from all of our domain controllers hourly and stores them remotely; i can collect the security logs , but is there a way to collect the ...
1
vote
2answers
132 views

Gathering buslogic SCSI hardware and virtual machine operating system

I'm trying to use Powershell to get SCSI hardware from several virtual servers and get the operating system of each specific server. I've managed to get the specific SCSI hardware that I want to find ...
0
votes
1answer
39 views

Method of obtaining SCSI hardware on all virtual servers

I'm looking for a method to check what the SCSI hardware of a VM is and identify any servers that have virtualbuslogic. I'm trying via PowerCLI to make this happen although I'm not sure how to specify ...
2
votes
1answer
106 views

How to export computers from Active Directory to XML using Powershell?

I am trying to create a powershell scripts for Remote Desktop Connection Manager using the active directory module. My first thought was get a list of computers in AD and parse them out into XML ...
2
votes
2answers
754 views

How to force tomcat to shutdown after x number of seconds on windows?

On linux systems the stop command in catalina.sh accepts a timeout parameter which forcibly kills tomcat after the supplied number of seconds. The catalina.bat however doesn't seem to have a parameter ...
0
votes
1answer
106 views

powershell not diplaying result properly

So i have the below script which basically 'imports' the log file from a robocopy task and then emails me the last 14 lines ( which are basically the stats at the end). However i cant seem to get the ...
1
vote
1answer
62 views

Are asynchronous operations on Azure snapshots automatically “queued”?

I am writing a script that: takes a snapshot of a data disk that is attached to a running VM copies the snapshot to different storage account (using Start-AzureStorageBlobCopy) deletes the snapshot ...
0
votes
0answers
66 views

“-STA -WindowStyle Hidden” Option not working with citrix

i have a powershell application published to citrix. It simple executes a remote batch file Initiator.Bat which then executes apowershell script with following command, Powershell ...
0
votes
2answers
305 views

Invoke command with IP address as Target server does not works at all

Please see the following command and with Trusted Hosts enabled, this does not work: Invoke-Command -ComputerName <IP address> -port 5985 -Credential (New-Object ...
0
votes
0answers
93 views

How to copy and rename files with powershell within subfolders?

I have the following folder and files structure that I would like to copy to a share then rename them. How can I do this with powershell? ...
0
votes
1answer
142 views

Lynx / Elinks alternative for Windows Powershell [closed]

Is there a text based browser available for Windows Powershell. An alternative for the *nix based lynx or elinks application?
2
votes
1answer
91 views

Manage client workstations with Remote Powershell via SSL

I am looking for a solution to remotely manage around 100 workstations. I will be connecting to these systems to complete several local system tasks. (3rd party updates, security auditing, incident ...
0
votes
0answers
92 views

Verifying Veeam Backups per Server using Powershell

I can use Powershell and the Get-VBRBackup and Get-VBRJob commandlets to get the status of a back up job. But i want to verify an individual server has been backed up in the last 7 days. Is that ...
2
votes
2answers
96 views

Running powershell commands ruined the users

The computer where the script is executing is in the one domain, I'll call it internal domain. Users which are tested are in the other (external) domain. I made a script to check if user exist in ...
6
votes
2answers
572 views

powershell: How to check if S.M.A.R.T is enabled on remote machines

I was attempting to get disk info of remote machines, including whether or not SMART is enabled on the drive by using the win32_diskdrive class. This is trickier than I thought. While it's easy ...
4
votes
2answers
1k views

Find computers in domain with static IPs - PowerShell

let me start by saying I'm not good at all in writing scripts or troubleshooting them, thus me being here :) I'm trying to find all the computers in a windows domain network that are using static IP ...
5
votes
1answer
444 views

How can I list hidden administrative shares using PowerShell?

I'm trying to write a script that will audit shared folders on a few HIPAA-sensitive servers. I'm getting a list of shares just fine using gwmi Win32_Share, however when I go to get the permissions on ...
1
vote
1answer
160 views

PowerShell Snap-In for IIS 7.0 IIsProviderSnapIn vs WebAdministration

I am attempting to install the Windows PowerShell Snap-In for IIS 7.0 on a server running server 2008 with service pack 2 installed, so I can use the WebAdministration snappin. On Installation I'm ...
5
votes
1answer
826 views

Script to remove Exchange 2010 AutoMapping for all mailboxes

I have an Exchange 2010 SP3 server that's getting Application event error 9646 from MSExchangeIS: Mapi session [ID] [AD User] exceeded the maximum of 500 objects of type "objtFolder" Looking into ...
0
votes
0answers
320 views

SQL PowerShell Snapin Problems

I am hoping this is an easy fix and oversight on my part. I need to be able to run the SQL cmdlets from remote machines. I have installed Microsoft® Windows PowerShell Extensions for SQL Server® 2008 ...
1
vote
1answer
97 views

Windows Powershell - 'MaximumAllowed' parameter in Win32_Share Create method

Any idea what the 'MaximumAllowed' parameter should be set to in order to have the "Maximum allowed" radio button ticked on the shared folder properties in Windows? I know it would be the same as ...
8
votes
2answers
389 views

Detecting AD Site options using PowerShell

How can I use PowerShell to find AD site options like +IS_INTER_SITE_AUTO_TOPOLOGY_DISABLED in PowerShell? I've been playing around with the following command, but can't get it to spit out anything ...
1
vote
1answer
490 views

Sending unauthenticated mail through MS Exchange with powershell (Windows Server 2008 R2)

I'm trying use Task Scheduler to run a powershell script and emails the output of a few commands. I'm using "Send-MailMessage" to do this. When I run the scheduled task with a domain admin account, I ...
3
votes
1answer
142 views

Using Powershell, compare the TimeCreated values of two events and take action if one is older than the other

I've created my own event log called ScriptEvents that I use a few scripts to write to. What I'd like to do is run these commands (or something equivalent): Get-WinEvent -FilterHashtable ...