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
0answers
2 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 ...
-2
votes
0answers
22 views

How to create new user based on existing one?

we have a configured user A. We want to create a new user taking all settings, preferences, register values, etc from existing one yet limit new user access to writes to only one folder. Is such thing ...
0
votes
0answers
9 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
18 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
0answers
8 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
43 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
24 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
26 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
54 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
25 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
40 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
17 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
51 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
47 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
31 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
57 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 / ...
-1
votes
1answer
45 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.
1
vote
2answers
46 views

Powershell HTTPS not working

I am a bit confused on how to configure certificate for my local host. My scenario is like: We've two windows 2012 servers (not joined in a domain) and I need to execute a powershell script remotely ...
-2
votes
0answers
20 views

Script to bulk import groups and contacts for Lync2013 [closed]

Does anyone have a script out there that will allow me as the administrator for our Lync 2013 Server to administer the groups and contact lists in Lync 2013? I have seen Contact Manager for Lync by a ...
1
vote
2answers
47 views

Distribution Group Owner Management Exchange PowerShell

In an Exchange 2010 (version 14.3 Build 123.4) environment, how do you add a new user to the "ManagedBy" attribute and remove another at the same time via PowerShell? (I'll be doing this for multiple ...
0
votes
0answers
10 views

Trying to set COM+ application component property in PowerShell

I am trying to check the Run application as NT Service box for an application in COM+ in Component Services using PowerShell. Does anyone know the $component.Value(s) to do this? Any help would be ...
2
votes
1answer
33 views

Powershell Workflow Parallel

I recently determined that I am able to run a workflow as parallel without using foreach. Syntax is below. workflow Get-OS { parallel { Get-WmiObject -Class Win32_OperatingSystem } } Is it ...
-1
votes
1answer
34 views

Delete files by date and character count

I have an interesting problem. I need to delete directories that are older than x days but are only numerical. We have a log folder that has log files that we need to delete but other files and ...
-2
votes
1answer
26 views

Script to open a webpage or at least hit a web api [closed]

I need to write some kind of script that runs on a windows server that can be scheduled to run throughout a day to open a webpage to a specific address or at least hit an HTTP api it doesn't ...
0
votes
1answer
26 views

Check deletion rights on AD object via powershell?

I need to build a script which check if the current user has rights to delete a special AD object and if this is the case the powershell script can delete it. Deleting an AD object isn´t the issue, ...
1
vote
2answers
37 views

powershell format a value that's already a string

I have some values that I want formatted in a specific way. To be very clear, its an IP address octet and I want it in a "xxx" format. For example if I have a octet value of "20" I want to display ...
1
vote
2answers
48 views

How risky is storing credentials on disk in a Powershell SecureString?

Basically, I want to cache the credentials needed for New-PSSession and make them available to scripts so they don't have to nag a human. If I use export-clixml or similar to store a PSCredential on ...
2
votes
1answer
24 views

Check which windows update will be installed

I manage a server windows 2012 which was not updated for approximately 2 years, to estimate the impact for a global update, I would like to know how many updates and which ones will be installed next ...
0
votes
1answer
30 views

How to install AV on existing Azure VM using agent tools?

If I already deployed a VM, how can I use the VM agent to install an antivirus software from the Azure marketplace (i.e. McAfee)? There must be some Powershell command or something but everything I've ...
0
votes
0answers
49 views

How to download files from my MSDN subscription using Powershell?

In order to install Microsoft software in my Azure labs, I'd like to grab the ISO files directly from Microsoft, as speed is so much better than downloading from my own repository. One example is ...
0
votes
1answer
84 views

PowerShell script generates lots of warnings in Windows Event Log

I have a - rather complex - PowerShell script running on a Windows Server 2008 R2. When executing the script in the ISE or also in the console, everything runs fine. No errors or anything else that ...
0
votes
0answers
26 views

Powershell - Printer settings not applying

I'm currently trying to script settings for a printer connected through a local network, a normal TCP/IP-printer setup if you will. Since I'm on my phone I don't have access to the code right now, ...
4
votes
1answer
103 views

Execute Powershell Add-Computer remotely via Invoke-Command

Scenario: When executed locally on the Azure VM, succesfully adds the machine to the AD, and restarts. $DomainName = "test.local" $AdminUserName = "sysadmin" $Password = <mypass> ...
0
votes
2answers
43 views

Unable to Run Get-WindowsFeature

I have a Windows 2012 instance running in the Amazon cloud. It's just a test server for an asp.net project and only has the necessary features installed. The problem is the instances is out of disk ...
0
votes
1answer
63 views

Can I use Powershell script on Win8 machine to copy files from xxx.sharepoint.com?

I am confused if my request is possible. The company I work for uses Office 365 and they gave us Sharepoint. We access SP by going to xxx.sharepoint.com on the Internet. I am thinking of writing a ...
1
vote
1answer
77 views

Transfer files via Powershell Remoting (like scp in linux)

During the creation of a few powershell-based deployment scripts, I sorely missed an easy way to quickly transfer a file to another server (over the internet) via Powershell Remoting, something like ...
0
votes
2answers
50 views

using powershell ; from a given location a of folder i want to validate and show the number of specific filetypes respective folder

Using powershell from a given location a of folder I want to validate and show the number of specific filetypes respective folder. I tried using the command to count the number of files in a folder I ...
1
vote
0answers
25 views

Powershell IIS plugin - cmdlets not working

I'm pretty much a novice at Powershell so bear with my noobness. I'm specifically trying to run the "Get-WebBinding" cmdlet (which I have successfully run on some of my other servers) Windows Server ...
1
vote
1answer
36 views

Remote location management copy and install large software updates to 50 LAN

Initially posted to Stack Overflow and was directed here. I'm new to programming and am trying to write a powershell script to manage software updates. I'm in a windows domain environment with over ...
4
votes
1answer
287 views

Cannot connect to Office 365 with PowerShell

I want to connect to Office 365 through powershell, referring to the tutorials a very simple task. But apparently not for me. I think I missed a simple but important trivia. Some info: license is ...
0
votes
1answer
41 views

Trouble with embedding html email with PowerCLI/Powershell for gmail

I am new to Powershell, I am a junior admin for a VMware environment. I am trying to automate a weekly report for snapshots in PowerCli. I am making the script in Powershell. I have made a simple ...
1
vote
0answers
33 views

Create shared folder on share automatically

I know there is a group policy where I can map a specific share. What if I want the group policy to create a folder on that share and map it during log on? I know there must be a way to do this in ...
3
votes
1answer
30 views

Exchange 2013: Weekly Message Count

I have a manager needing to check on an employees sent and received message count as the employee is stating they are getting too much mail compared to others in the company. I've been checking ...
0
votes
0answers
23 views

Access denied on service password change [duplicate]

This works if I change the password manually but I get an access denied message. I think it might be how I am trying to do it. #Service Credential Change -Multi #This script allows us to input a ...
1
vote
2answers
135 views

Access already mapped network drive in PowerShell

I am running a Windows Server 2012 installation inside VMWare Workstation. I have shared folders enabled, so drive Z: is mapped to \\vmware-host. I can correctly access this drive in Explorer (I can ...
1
vote
0answers
32 views

PowerCLI automation set-cddrive error

When attempting to change ISOs on a powered on guest instance, set-cddrive is returning an error but completing the command. A couple different commands produce the same result: $theVM | Get-CDDrive ...
0
votes
0answers
50 views

Can't log into Exchange Management Shell and EAC in Exchange 2013 via Server 2012 R2

I'm not sure why but I my Exchange PowerShell can't log into my Exchange server and I can't access the EAC via localhost or the URL. I did notice that I enabled HTTP Proxy in IIS and that I used ...
0
votes
1answer
82 views

Reflect HKLM registry changes to HKCU

Ok so I have a Local Group Policy (under Computer Config, not User Config) to force install extensions in Chrome. This policy needs to run for every user of the computer. The value is going to change ...
0
votes
1answer
42 views

AAD Sync not able to connect to online service using powershell

When trying to connect to my Office 365 tenant using connect-msolservice from powershell I get the following error: Connect-MsolService : The HTTP request was forbidden with client authentication ...
2
votes
0answers
43 views

Viewing Storage Space allocation for physical disk

I have a server that had four disks (2x 4TB and 2x 3TB drives) in a Server 2012 R2 Storage Pool. There are two virtual disks in the pool - a parity disk and a mirrored disk. The idea was to add two ...