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
17 views

Getting All Users From Active Directory Groups Using Powershell

I have a powershell script that I've written that gets all of the groups from an OU and stores them in a variable $groups. I want to be able to access the users of each group but seem to be having ...
0
votes
0answers
11 views

How can I Deny permissions to logon to Remote Desktop Session Host server in powershell script?

I am need of some assistance please. I am a system admin and I am trying to create a script that will assist with the tedious tasks I have to do with disabling a user that no longer works for the ...
4
votes
1answer
24 views

How to clear Exchange mail queues using PowerShell for a specific user

Recently, my organization were victim of a spam attack. Sadly, some users provided their email and password. The attacker set up a long queue of emails to be sent (from the victims account). We had ...
0
votes
1answer
35 views

PowerShell just Hangs [duplicate]

Anyone else have problems when running a PowerShell script, where the script just hangs in one spot until you hit Enter or something on the console window? This happens to me all the time, and for ...
0
votes
1answer
44 views

PowerShell Script Not Running on Scheduled Task

I have been attempting to set up a PowerShell script to run as part of a scheduled task on a Windows Server 2012 R2 server. The script will run if I execute it manually from the GUI but all but one of ...
0
votes
1answer
7 views

Set-SCOMMaintenanceMode EndTime Duration Clarification

Microsoft provides the Set-SCOMMaintenanceMode cmdlet in part to manage the SCOM maintenance system. A required parameter is the declaration of how long the maintenance mode should last (-EndTime). ...
0
votes
0answers
17 views

Export mail only from Start date to Now

I am trying to export just the mail of user12 from the specific start date 03/30/2015 to Now. The following command does work without the filter MessageKind. I chose not to use -IncludeFolders ...
1
vote
1answer
22 views

Importing users to AD with CSV, cannot get some fields to work

Been trying to build a CSV file to import users into Active Directory. I can get everything to populate, except for E-mail, Password, and Enabling the user. Just using this cmdlet in Powershell. ...
0
votes
0answers
19 views

Quest PowerShell: Export AD permissions and apply them at a later stage

I'm trying to standardise our AD permissions for our 4 support groups. I've already applied permissions for 2 standard groups (Global support) and I'm now facing a painful clean-up for site based ...
0
votes
2answers
51 views

Active Directory: Track old password changes and expiry dates?

Is there anyway to find out when the last 2 passwords changes were made for an account? I reset a account password but I want to know if it already changed hours or minutes before I reset. OR maybe ...
1
vote
1answer
26 views

Creating bulk emails with different domains - PowerShell

I've been tasked with appending an email address for existing users. I have 500 users in an Exchange 2010 environment that have Company.com as their email address. For email segmentation due to ...
0
votes
1answer
15 views

Get RD user client hostname in Server 2012 R2 RD deployment [duplicate]

There is currently nowhere in the server manager GUI that I can see, that shows me the hostname of the machine a user is using to log onto our remote desktop deployment. I have had a quick look ...
-1
votes
1answer
31 views

Use PowerShell to create a web page from an array

The goal of this code eventually will be go get all other web pages within a folder and create hyperlinks to file with the name of the files. This code mostly works but puts all elements of the array ...
1
vote
2answers
17 views

Invoke-WebRequest timeout if NIC 1 disconnected

I have a windows pc with three network interfaces. One is a UMTS modem and the two others are lokal networks and one network has connection to the internet. Invoke-WebRequest ...
-5
votes
0answers
32 views

How can you Upgrade PowerShell from version 2.0 to 3.0 for Windows Server 2008 R2 Without a Reboot how can I do this ? [duplicate]

I need a way to Upgrade PowerShell from version 2.0 to 3.0 including prerequisites for Windows Server 2008 R2 ( Without a Reboot ) how can I do this ?
0
votes
0answers
34 views

Trying to add group to the security tab of an extended right

. The only problem is that the rights are not propagating to the extended attribute, even in the advanced tab :(. If I go in to adsi and check the security tab of the extended right it shows ...
3
votes
1answer
56 views

Add security rights to an extended rights guid

Any help would be greatly appreciated! Please ask if you don't understand something. I am trying to explain it as best as I can. The value I am trying to edit is ...
0
votes
1answer
31 views

What permission do another domain user need to restart IIS app pool on my machine?

Can this be done without adding user to local Administrators group? All I need is to remotely stop app pool, create site and start the pool again. I'm trying to do this with Powershell script. I keep ...
0
votes
1answer
26 views

Exchange: Auto Reply Rules

Is there a way to disable or remove the Automatic Reply Rules that can be created in Outlook with Powershell? They can be reached by clicking the 'Rules...' button under the 'Automatic Replies' window ...
4
votes
2answers
60 views

How to filter the Windows Security event log by SID?

I want to filter the event log for a certain user, but I don't think there's an option to search by SAMID. There is a filter by UserId though, according to here. Is the following correct syntax ...
2
votes
1answer
45 views

Use the DFSR Module on a Windows 2012 R2 Server Core

I have a standard Windows 2012 R2 box setup with server core. I have the file server roles installed along with DFSR. I want to use the powershell tools like Get-DfsrState and other Get-Dfsr* to ...
1
vote
1answer
42 views

Managing Exchange 2010 from Windows 2012

We have been managing Exchange 2010 from a separate Windows 2008 R2 server and recently upgraded the management machine to Windows 2012 R2. The EMC works fine but I am somewhat limited in the shell. ...
0
votes
1answer
31 views

How to run Azure cmdlets in background?

Several Azure PowerShell cmdlets have very tedious run times; a trivial task such as setting a static IP address on a virtual machine can take more than a minute (I guess this is because the cmdlet is ...
1
vote
1answer
30 views

PowerShell - How to activate Windows CAPI2 Eventlog?

I want to activate the CAPI2 (microsoft/windows/capi2) Eventlog with PowerShell. How can I activate the CAPI2 Eventlog? I do not have a solution with PowerShell. But I´m sure there is a solution with ...
5
votes
2answers
76 views

Queuing reboots in Powershell

I am working on a project to reboot a great deal of computers. One of the important requirements is to stage the reboots so all of the machines aren't rebooting at once (too fast and it will cause ...
-1
votes
0answers
15 views

SCCM Software Library Total Size Report

Is there an SQL query or powershell command to get the 1) Name and 2) size of each item in the Software library in SCCM 2012 R2? Sam Fakhreddine
1
vote
0answers
37 views

Getting Group Policy identifier in PowerShell

Some of our computers have a random "local group policy" being set that forces them to check a nonexistent intranet server for Windows Updates instead of using WU over the internet as they should. ...
0
votes
1answer
24 views

How to retrieve list of unique file name parts?

A folder with migration scripts has a mix of SQL and PHP files named like these: 2015-03-22.23-00.up.sql 2015-03-23.19-00.up.development.sql 2015-03-23.19-00.up.production.sql 2015-03-23.19-00.up.sql ...
0
votes
1answer
11 views

SCEP: imitate potential threat in both live and regular scanner to inspect logs

I am doing some powershell stuff to parse a few logs at work. I would also like to collect some information from the SCEP logs. I find the amount of logs available as well as the different locations ...
0
votes
0answers
19 views

parsing SCEP logs: last definitions update, last scan, viruses found [duplicate]

I would like to write some powershell scripts to extract some information from the SCEP log files. Particularly, I am interested in the following information when was the last scan performed? ...
1
vote
1answer
28 views

Need to create multiple emails with different domain names - PowerShell

I'm being tasked with creating a script that polls AD for specific information and then creates an appropriate email address based on that information. Please allow me to give you a bit of a rundown. ...
0
votes
0answers
22 views

Export Public Folder heirarchy to a regular folder structure/file share

What known method are available to migrate emails (.msg files) from a public folder (Exchange 2007) to a regular folder/file share? When the emails are copied over to a regular folder, it is required ...
2
votes
1answer
47 views

Is the file current.mof a bottleneck when using the DSC module?

The msutter DSC module (PowerShell Defined State Configuration) seems to have a bottleneck. Every class that uses a DSC resource generates intermediate Powershell/DSC code that creates a file called ...
1
vote
2answers
19 views

Exclusive delete to delete most files trees but keep specific ones

Im trying to create a script that when received the specific file it unzips it looks through the unzipped file and deletes the entire contents except for two or three specific folders with their ...
2
votes
2answers
55 views

Restrict user account to 'only' remote Powershell sessions

Is it possible to only delegate a enough permissions for a user to only be able to utilize a Remote Powershell session? I have a limited set of scripts that I want to run from a central location ...
0
votes
0answers
42 views

Access Denied when Creating Remote Powershell session for Exchange 2013. But not always

Access Denied error is thrown sometimes when connecting to an Exchange Server 2003 SP1 server. The cmd-let used to connect is: Set-ExecutionPolicy RemoteSigned $sessOpt = New-SessionOption ...
1
vote
0answers
39 views

Allow Powershell script executed on Exchange server to send mail - best practice?

I've got a single multi-role Exchange 2010 server and a need to execute a Powershell script on monthly schedule. And i really would like to send a report via email to some local company's mailbox by ...
0
votes
1answer
23 views

Access 'Response Time (ms)' windows disk counter from powershell

In perfmon there is a 'Response Time (ms)' column on disk tab. It shows response time by process. How can I get this value in powershell? I didn't find any solution in the internet. WMI serves just ...
1
vote
2answers
60 views

change ip address for 10 computers based on a txt file in powershell or vbscript

I have a txt file that looks like this PC1 192.168.0.2 PC2 192.168.0.3 PC3 192.168.0.4 I would like to change computers ip addresses based on that list, so it will fill up the computer name and ...
1
vote
0answers
46 views

How to persist credentials in a remote Powershell session?

I have an Azure File Share and would like to use this from my Azure VMs - after persisting the credentials on the VMs with cmdkey and mounting with net use. This was tested by running these commands ...
1
vote
1answer
39 views

How to apply xNetworking xIPAddress Desired State Configuration (DSC)?

Using Windows Server 2012 R2. The goal is to set the IPv4 address of a server. As DSC correctly states in the verbose message below, the Expected [ip is] 192.168.0.203, [while the] actual [ip is] ...
1
vote
3answers
76 views

Powershell script not working when launched from SSH (or winexe) from a Mac or Linux Client

I have a Powershell script to backup MSSQL on a Windows Server 2008 R2 box. It backs up a specific DB to a local disk, then moves the backup to a Network mounted CIFS volume. It works 100% fine when ...
1
vote
1answer
47 views

Is there away to rename a VM in System Centre Virtual Machine Manager 2012 R2?

I have a VM in SCVMM that the VM name no longer reflects the name of the OS. OS had to be renamed, and now the VM in SCVMM name is incorrect, and it's greyed out so I can't rename it. Is there any ...
3
votes
2answers
58 views

Deallocated Azure VM Loses IPv4 DNS Address

I deallocate my development Azure VMs every night to conserve my credits. My VMs are all on one vnet using a domain controller. Since it is on the subnet, the domain controllers address never changes. ...
0
votes
0answers
37 views

Error with OraOLEDB.Oracle in PowerShell

I am a sysadmin who primarily handles Powershell scripting for our AD environment, and we periodically hit this error in both our test environment and in live. Exception calling "Open" with "0" ...
2
votes
2answers
66 views

How do I use PowerShell GPO cmdlets to set up file security?

I need to automate the creation several security groups, then create and apply a GPO that includes OU / Security group specific file permissions and auditing. I have the OU and group creation done. ...
0
votes
2answers
55 views

Windows: change own password of standard user by using commandline

I want to change the password of the current logged in Windows user (no Active Directory) in a scriptable way. The users have the right to change their own passwords and already can change the ...
0
votes
0answers
50 views

diskmgmt.msc - Is it possible to script it using powershell or command line?

I have an application which uses the IBM Softlayer API to create a Softlayer server, with two disks. The main disk C: has the Windows (2008R2 or 2012) operating system, and another disk called "Disk ...
1
vote
3answers
69 views

PowerShell/ADSI Permission Issue with AD related tasks

I'm working on a PS script that will give users a GUI & a few buttons to click to do some basic tasks such as unlocking an account, enabling/disabling, changing passwords and killing processes / ...
-2
votes
1answer
51 views

How to add bunch of admin accounts to 20 Windows 2012 servers

Is there a quick way to add bunch of admin accounts to 20+ Windows 2012 servers? It would be way too cumbersome to rdp to each server and add accounts to the local admin group.