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
2answers
34 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
27 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 ...
1
vote
1answer
12 views

Copy Folder from Structure to new location

I have a structure of 900 users like below User 1 Personal personal.pst I need to copy the Personal folder from each user folder to a new structure such as below User 1 (diff username) ...
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 ...
3
votes
2answers
27 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 ...
0
votes
0answers
9 views

Removing archiving stub

We are transitioning to a new version of exchange and need to remove the archive stubs, from outlook, which are short-cuts to archived mails which we will not need. There are 1200 mailboxes that need ...
3
votes
2answers
14 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 ...
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
132 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
811 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
52 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
22 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
14 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
478 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
23 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
40 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
34 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 ...
0
votes
2answers
1k views

KQL Query to specify date range for Mailbox search?

I'm trying to verify some phone numbers using our exchange server with the following query to send the results to my inbox: Get-Mailbox | Search-Mailbox -SearchQuery “Body: '*XXX-XXX-XXXX*' OR ...
2
votes
1answer
26 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
46 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
120 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
25 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
10 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
30 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 : ...
2
votes
1answer
37 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
51 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
660 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
24 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
88 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 ...
0
votes
1answer
935 views

Powershell execution policy within SQL Server

Can anyone help? Firstly I apologise if this is the wrong forum and for the amount of text you have to read. I'm not allowed to post images yet and a picture is worth a thousand words..... When ...
1
vote
0answers
33 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: ...
5
votes
1answer
3k views

Batch script is not getting executed when called by Start-Process Cmdlet

I have a strange issue on a Windows Server 2012 R2 here that just does not make any sense to me at all. I've got a PowerShell script that basically has the following structure: Function ...
2
votes
1answer
31 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
1k views

How can I get the number of users actively using Lync?

How can I report on the number of users actively using Lync in my organisation? I want to be able to find out what the uptake is. Thought about going through our mail server, but the saved ...
1
vote
2answers
1k views

Importing NTFSSecurity module from UNC path fails

I've created a central repository for Powershell modules, but I'm having trouble loading one in particular. The NTFSSecurity module is failing to import with the following message. PS Z:\> ...
3
votes
1answer
1k views

Exchange's New-MailboxExportRequest behaves strangely with DateTime parameters to ContentFilter

I am attempting to extract a certain date-range of emails from a mailbox into a PST, but using a DateTime parameter for ContentFilter doesn't seem to work as expected. This should export everything ...
1
vote
1answer
28 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 ...
0
votes
1answer
2k views

How to save event logs “Network Policy and Access Services” on NPS server

We have a Windows Server 2008 R2 Enterprise server with NPS role installed in it. (We dont use NAP). Is there any way, we can save all the event logs in------ Event Viewer -> Custom Views -> ...
1
vote
1answer
34 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
380 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 ...
5
votes
2answers
2k views

Changing physical path on IIS through appcmd isn't activated

We have come across an issue on IIS 7.5 where we have a simple deploy system which consists of the following: Create a zip-file of new webroot, consisting of three folders: Api Site Manager This ...
4
votes
3answers
552 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
90 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
21 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 ...
2
votes
4answers
5k views

How to avoid Remove-Item PowerShell errors “process cannot access the file”?

We are using TfsDeployer and PowerShell script to remove the folders ising Remove-Item before deployment of a new version. Sometimes the PS script failed with the error Remove-Item : Cannot remove ...
-1
votes
0answers
37 views

Attempting to list all shares on a networked server using PowerShell

So this is the issue which is concerning me. I'm attempting to connect to a networked server which is using SMB protocol, then once connected to create a list of every share on the server. I have been ...