An interactive shell, scripting and programming language, and surrounding environment from Microsoft. Commonly used by system administrators managing Microsoft software (including Windows, Exchange, SharePoint, and cloud services Azure and Office 365), PowerShell is included by default with Windows, ...

learn more… | top users | synonyms (1)

0
votes
1answer
2k views

Exchange 2010 Search-Mailbox to delete Exchange Journal emails

I am using this PowerShell command to try and delete emails from our Exchange Journal, [PS] C:\Windows\system32>Search-Mailbox -Identity exchangejournal -SearchQuery ...
1
vote
2answers
69 views

How do I get the equivalent of Set-DnsClientServerAddress in Windows Server 2008 R2?

How do I set the DNS address for a network adapter programmatically in Windows Server 2008? It looks like Set-DnsClientServerAddress isn't supported.
6
votes
1answer
74 views

Can I change the update descriptions in WSUS?

On each Microsoft patch day, I have a pretty large amount of new updates I want to approve to my clients. But instead of 'Approve all updates and continue', I gather information on each update at its ...
2
votes
2answers
2k views

Removing many Exchange full access permissions on a mailbox

I'm trying to use Powershell to remove certain full access permissions on an account as part of a disable user process. I need to remove all full access permissions on the account except for: NT ...
1
vote
1answer
1k views

Exception Enumerating SQL Server Instances with SMO WMI ManagedComputer

I'm trying to use the SMO WMI API/objects in PowerShell 2.0 on Windows 7 with SQL Server 2008 R2 installed to get a list of SQL Server instances on the local computer using the Managed Comuter object. ...
2
votes
2answers
2k views

powershell v2 remoting - How do you enable unecrypted traffic

I'm writing a powershell v2 script that I'd like to run against a remote server. When I run it, I get the error : Connecting to remote server failed with the following error message : The ...
-1
votes
0answers
51 views

PowerShell: Copy and Replace Files Across Subdirectories

So I'm looking to use PS to look at all files (other than the script) in the current directory, then search for those same files (possibly even with earlier version identities) in subfolders from a ...
0
votes
0answers
13 views

Finding HP archiving Stub emails

In exchange 2007 managed content, is it possible to search all mailboxes for a mail item using the message class, i.e. IPM.Note.PERSISTMailItem is there a powershell script for this.
2
votes
4answers
288 views

24 hour expiration of first password

EDIT** I'm thinking of running a scheduled task at the end of every workday to retrieve all accounts who have never logged on and disabling their accounts. Please excuse any syntax errors. I may very ...
0
votes
1answer
1k views

DPM 2012 running powershell script in task scheduler

I'm having a problem running a custom PS script I created to attach systems into the console. My PS script works when i'm running it interactively in the DPM Management Shell. I was referencing this ...
1
vote
1answer
49 views

Automate Windows administration tasks [closed]

I'm diving headfirst into PowerShell (by no means an expert yet) and am looking to build a GUI to automate Windows admin tasks, both for the deskop and server side. I know there are third-party tools ...
1
vote
1answer
25 views

Add a scheduled task to the GPO progrematically

The assumption is I'm on a DC with admin rights. I want to add an immediate task to the GPO to run a .exe on the workstations, but I want to do it without the GUI i.e. quietly. Is there a way to do ...
3
votes
3answers
26 views

List shadowcopy timestamps of netapp

Is there a way (powershell, commandline, api, snmp) to list the snapshot timestamps of a file on a network location. So i'm searching for an automation of what windows is doing, when you click ...
0
votes
2answers
54 views

Poll domain members for their screen resolutions

Is there a way via WMI or Powershell to ask each domain member what the resolution is on their desktop? I need to know but can't go and visit each one. For bonus points, how to summarize the results ...
1
vote
1answer
35 views

How can I run this powershell script in parallel?

I have 100 databases in Exchange that I want to perform a task on. I might want to change the currently mounted server or something else. When I run this command, each database is serially synced. I ...
2
votes
1answer
4k views

Changing permissions with Pwershell recursive

I am trying to write a script in powershell, that will find folders recursively and based on the folder name replace the ACL on the folder. I have folders already with the correct permissions. These ...
0
votes
3answers
1k views

Enable-PSRemoting on Windows Server 2008 R2 error

When giving the command Enable-PSSRemoting with or without the -Force parameter this error occurs Set-WSManQuickConfig : More data is available. At line:50 char:33 + Set-WSManQuickConfig ...
4
votes
2answers
65 views

Stopping IIS websites permanently with PowerShell

Stopping websites using Stop-Website is, apparently, not the same as stopping them using the IIS Manager. Stop-Website 'Some site' iisreset.exe # site is started again Using IIS Manager, the state ...
4
votes
2answers
1k views

Why am I getting unauthorized errors with Powershell get-winevent?

I'm a domain admin equivalent, I've tried running in an elevated console (right-click> run as administrator), and I'm consistently getting errors when executing get-winevent -logname application | ...
0
votes
1answer
152 views

How can I use Powershell to add a site to my IIS or IISExpress server

Is it possible to add a site (and bindings) to my applicationHost.config file for IIS Express or IIS ? here's one I had to manually add (which works perfectly) ... <site name="Our Awesome ...
3
votes
2answers
890 views

Nesting PowerShell DSC configurations from different files

If I nest DSC configurations in a single file like this, it works fine: Configuration Secondary { Param ($SomeParameter) Environment Test { Name = $SomeParameter Value = ...
1
vote
1answer
81 views

How do I enable Get-MailboxFolder to work against other mailboxes?

Get-MailboxFolder by default seems to only work on one mailbox, that of the logged in user. I'm trying to leverage the Identity parameter of the cmdlet to connect to other mailboxes. I discovered ...
1
vote
0answers
31 views

Issues with Powershell Remoting

I'm configuring a new network and i need to enable Powershell Remoting. I'm in an Active Directory Domain and all my Clients are connected to the Domain. I'm able to run remote commands (Get-Process ...
0
votes
0answers
29 views

Unable to install RD Connection Broker role service on server

I'm currently having a lot of difficulty trying to setup a new RDS 2012 R2 Session Deployment. New-SessionDeployment -ConnectionBroker servername -SessionHost servername -WebAccessServer ...
7
votes
3answers
768 views

Cannot set Powershell ExecutionPolicy for CurrentUser

Here is a sample of the commands I am running: PS C:\> Get-ExecutionPolicy -List Scope ExecutionPolicy ----- --------------- MachinePolicy Undefined UserPolicy ...
2
votes
1answer
35 views

Reversible Encryption - Not Defined but Showing as Enabled?

I'm reviewing our complex password policy that was setup by a previous admin and I'm trying to gain some clarification on the setting for Reversible Encryption. In our organization, reversible ...
1
vote
2answers
54 views

Change different domain account without being admin Windows

I have 2 accounts on a domain. I can log into a citrix virtual desktop with the one account fine, but the other won't let me log into anything until I first change my password. I am remote, so I ...
0
votes
1answer
47 views

Is it possible to add permissions to an Active Directory account using PowerShell?

We're deploying Active Directory, and we're using PowerShell scripts for most of it: creating the forest, creating AD elements (users, groups, sites, subnets), etc. We'd like to make some users able ...
2
votes
1answer
1k views

How do I configure permissions for a cluster share using Powershell on 2008?

I have a cluster resource of type "file share" but when I try to configure the "security" parameter I get the following error (excerpt): Set-ClusterParameter : Parameter 'security' does not exist on ...
2
votes
1answer
35 views

How to properly deploy internal self-signed scripts (Powershell)

Completely new to certificate usage so be gentle. I'd like to deploy Powershell scripts that I made to other employee computers so they can use them, but I will need to sign them in order for them to ...
0
votes
3answers
57 views

Security concerns with enabling PowerShell on a production server [closed]

I work in the software development side of an ISV. We're thinking of using PowerShell for some utilities in and around the core application (which itself is ASP.NET). One of my colleagues said to me ...
2
votes
1answer
210 views

Version v4.0.30319 of the .NET Framework is not installed and it is required to run version 3 of Windows PowerShell

I have a server which we are using for Batch processing. I can login to the server with svc_account and run powershell -f file.ps1 and it runs fine in either version 2 or 3 by the following - ...
0
votes
0answers
39 views

powershell command to get a list of all the snapshot in vmm (hyper-v)

i am using below script to get snapshot which are associated with my particular VM, but i am getting only recent snapshot information , can someone correct me in below script - $vmcheck = Get-VM ...
0
votes
1answer
15 views

Want to get checkpoint details for particular VM through “VMM PowerShell Script” activity

i have orchestrator with service manager installed . now i want to give facility to my developers to get checkpoint information about respective VMs (particular) from SMportal so that they can revert ...
3
votes
2answers
2k views

Using Powershell to update users home directory

I am trying to change the home directory path to a bunch of users. I wrote a script in Ppowershell which should change the path the username like so: \\serverName\shareName\$_.SamAccountName The ...
1
vote
1answer
40 views

Format-List in Powershell-Function not working

i want to use format-list inside a function in a powershell script to have some nice-formatted output. But when I use it, it simply doesn't print anything. In this thread the author had the same ...
2
votes
2answers
5k views

PowerShell - finding users who are Inactive AND not disabled

I wrote this cmdlet: Search-ADAccount -filter {(enabled -eq $true)} -Users Only -SearchBase "ou=FirstOU,dc=domain,dc=com" -AccountInactive -TimeSpan 30 But it outputs an error: Search-ADAccount : ...
4
votes
1answer
88 views

Bulk License Office 365 Users by OU with PowerShell

I'm trying to do something that I don't think should be too complicated of a fix. My end goal: I have certain users in one AD OU that need to use a certain license in Office 365, and different users ...
3
votes
2answers
69 views

Hyper-V guest loses network access when virtual switch port is in trunk mode

I have guest VM on a Windows Server 2012 R2 machine running Hyper-V. Currently, the guest is using the native vlan (vlan ID 1). I can communicate with the guest from the host and from the network. ...
3
votes
1answer
706 views

Strange format-list behavior in this PowerShell script

I have a weird behavior with format-list. When I paste the following code directly into the shell - everything works like a charm: @("Administrator","SomeUser","SomeOtherUser") |% { ...
0
votes
2answers
25 views

Powershell script failing when executed from Azure Site Recovery Plan

$username = "username" $password = convertto-securestring "*****" -asplaintext -force $cred = new-object -typename System.Management.Automation.PSCredential -argumentlist $username, $password ...
2
votes
2answers
97 views

Can I find the path to a DCOM application executable with WMI or Powershell?

I have installed (and registered) a DCOM application on a W2K8R2 machine, and its GUID can be found in the DCOM list shown by dcomcnfg. I can also use Powershell to find a Win32_DCOMApplication or ...
1
vote
0answers
72 views

enter-pssession : Connecting to remote server failed with the following error message : The user name or password is incorrect

I am unable to connect to domain controller via below script. This script is working for another domain controller so it mean script is correct. While I am connecting i am getting an error: ...
2
votes
1answer
67 views

How can I invoke a foreground process from a background PowerShell Job?

I'm working on a PowerShell script that provides console output and restarts the system several times during the script's operation. As soon as it starts, it registers itself as a Scheduled Job so ...
1
vote
1answer
35 views

Powershell remoting with active directory

I am able to connect to domain controller via below scrip remotely, but after that i want to run disable-ADAccount ,Get-ADUser command but I am getting error Get-ADUser : The server has rejected the ...
1
vote
1answer
49 views

Import IIS Advanced Logs into SQL

I'm using IIS 8.5 Advanced Logging and also logging some custom HTTP headers. How can I import the raw logs into SQL on a regular basis (i.e. every minute)? I want to avoid the overhead of ODBC ...
1
vote
1answer
402 views

How to give “only append” access to user in windows , for logging purposes

I have a powershell script which takes some data and dumps into a logfile whenever its executed.The script resides in single location and shortcut is distributed to all. I want to log the events on ...
4
votes
3answers
588 views

WinRM listener is not all ears

This is what happens when I try and connect to Powershell on my remote machine: PS C:\Users\Jonathan> Test-WSMan -ComputerName 54.228.XX.XX Test-WSMan : The WinRM client cannot complete the ...
7
votes
1answer
176 views

In what context do SCCM Powershell detection scripts run in?

I have finally had success using PowerShell detection scripts on clients with AllSigned execution policy. (hint: It started working after installing the latest service pack and using Adam Meltzer's ...
-1
votes
1answer
25 views

Apply group policy based on RDP Client O.S

I created a group policy to change the default shell, so that handheld PC can RDP to a Terminal Server and have the lob application kiosked. This work fine, but, sometime, is necessary to RDP with the ...