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
1answer
134 views

AD Properties: What is the difference between Modified and modifyTimeStamp

I have found: the modifyTimeStamp is contructed from whenChanged, both of which are not replicated. However, I have not been able to find a definition or explanation for the Modified property, though ...
1
vote
1answer
60 views

Powershell: Fancy new cmdlet to install CRLs too?

So Win8.1 and 2012 R2 includes a neat new cmdlet to install certs: Import-Certificate [-FilePath] <String> [-CertStoreLocation <String> ] [-Confirm] [-WhatIf] [ <CommonParameters>] ...
0
votes
0answers
111 views

Scripting for bulk NTFS permission xcacls.vbs vs PowerShell

I have a batch file with about 1000 lines using xcacls.vbs for customizing NTFS permissions for complex folder structure (removes of grants, removes of inheritance, then grants plus some explicit ...
1
vote
1answer
52 views

Unregistered a computer with the domain controller using powershell?

From what I understand when you add a computer to the domain, via Computer->Properties->Advanced system settings->System Properties->Computer Name->Network ID, it gets registered with ...
2
votes
2answers
176 views

Adding a DNS A record to a Win 2008R2 server from an Win 2008R2 server or Win7 via Powershell

I recently discovered that it is possible to simply automate DNS entry administration with a nice cmdlet: Import-Module DnsServer Add-DnsServerResourceRecordA -Name mail2 -IPv4Address 192.168.0.10 ...
3
votes
1answer
224 views

Scheduled Task to run 32-bit PowerShell Script with 3 Arguments

TL;DR Version I need to run a 32-bit PowerShell script that takes three arguments as a scheduled task in Windows Server 2008 R2. The script starts a FileSystemWatcher, so I need to keep it alive so ...
1
vote
1answer
197 views

Change a DCOM application's identity with a script

I have a Powershell script to set up a WS2012 web server with no user interaction. The only thing I can't do in the script is to change the identity of a DCOM application. Or, more specifically, I ...
2
votes
2answers
93 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
96 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
227 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
58 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
66 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
62 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
232 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
319 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
45 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
59 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. ...
2
votes
0answers
116 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
63 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
40 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
29 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
94 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
433 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
57 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 ...
0
votes
1answer
139 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
127 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
39 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
128 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
33 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
169 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
86 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 ...
1
vote
0answers
57 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
491 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
297 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
76 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
52 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
291 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
83 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
48 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
53 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
217 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
65 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
107 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
74 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
66 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
84 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
387 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
499 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
262 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 ...