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)

1
vote
2answers
67 views

Creating valid mail enabled contacts without using Exchange specific cmdlets

I have written a powershell script to routinely process and import a large (over 70k) amount of contacts into an Exchange environment. The script works fine but I would like to speed it up if ...
-4
votes
2answers
743 views

Modifying bulk user account attributes in AD

We created around 1,000 users but the first name, last name, display name, and logon name are all in uppercase. Now we are having a hard time changing all of these manually. Is there a way to we can ...
0
votes
1answer
558 views

Find out the name of all the servers a paticular account has logged or has a disconnected session on it

Hi We have around 400+ of servers and one domain + 3 sub domains, Whenever we change a password [Security reasons] the accounts keeps getting locked out as soon as we unlock it. So is there a way we ...
1
vote
3answers
363 views

Get installed programs via cmd or powershell [duplicate]

I am trying to get all installed apps in the computers of my domain but i haven't found a way to get the information in an accurate way first i was trying to achieve this through the registry key: ...
0
votes
1answer
108 views

File Server Resource Manager won't execute powershell scripts

Solution: Ended having to enable "Turn on Script Execution" in Group Policy. Located under Administrative Templates\Windows Components\Windows Powershell. Enable policy and set your desired execution ...
1
vote
1answer
136 views

How to modify Azure VM firewall rule for remote desktop

On an Azure VM I edited the Windows Firewall rule "RemoteDesktop-UserMode-In-TCP" so that only our Remote IP address was allowed access. In order to do this I also had to select General > Action > ...
0
votes
1answer
57 views

Difference between two powershell scripts

I received a script that is supposed to scan the event logs of 4 DCs, searching the event ID 4740 (user lockout). This is script number 1. Now I thought to myself, "Why scan all the DCs when I can ...
1
vote
1answer
206 views

Add 32-bit printer drivers to 64-bit windows server programmatically

GOAL: To install both x64 and x32 drivers for printers on a Windows 2012 R2 print server automatically. INFORMATION: So far, I've been able to install x64 print drivers with no problem. My attempt to ...
-3
votes
1answer
43 views

Export Mailbox to PST Every Month through PS [closed]

I have the following code which suppose to export previous 30 day mailbox from the current date. But it always exports complete mailbox, it ignores the content filter. $mailbox = "psingh" $FromDate ...
1
vote
0answers
31 views

Powershell Script to Automate Mailbox to PST

I have one script which is working though but I am not a advanced programmer. Please somebody modify my script as I wanted to ? 1) Mailboxes should be exported from specific server "ServerX". Right ...
0
votes
1answer
102 views

Powershell Delete list of files from directories located on a network share

I wrote the following script to delete all temp files and cached data from users profiles located on network share. It works fine when I run it locally on my machine but when I attempt to run it on ...
1
vote
1answer
103 views

Powershell to exclude Group Members from Dynamic Distribution List

I am attempting to remove specific users from a Dynamic Distribution List. I have searched and toyed with my PowerShell script for sometime with no luck. I'm sure it is something I am overlooking as ...
2
votes
2answers
46 views

Exchange 2010 Powershell Output Each Mailbox permission to separate text files

I am looking to output the results of Get-Mailbox –Server MYserverName | Get-MailboxPermission | FL piped into individual text files for each individual mailbox, with the text file named for the ...
0
votes
1answer
81 views

Change network category

My server has two network interfaces, one for public interface and one for internal management. These networks are completely isolated from each other. Both have own cables, routers and so on. I'm ...
6
votes
2answers
96 views

Powershell remoting suddenly stops working

I'm having trouble executing a remote powershell script which is supposed to update the installation of an application for automated testing in a taskmanager task running once a day. The rather ...
0
votes
1answer
71 views

Script to retrieve computer objects in specific AND display their respective OU's

I have an OU with many sub-OUs, each with an OU for computers. The highest level OU to start is 'Departments' with many sub-OU's. I need a script to retrieve all computers and list them in a table ...
0
votes
1answer
268 views

Finding linked mailboxes

I have an Exchange 2007 environment in a resource forest scenario with linked mailboxes, which are linked to AD accounts in the customer's domain. The problem is that some users are unable to view ...
1
vote
1answer
51 views

Why does New-SCVirtualNetworkAdapter fail for VMs with names longer than 64 characters?

I have 2 identical VMs, the first has a relatively short name while the 2nd has a name with 65 characters. Why does New-SCVirtualNetworkAdapter succeed for the first but fail for the 2nd? ...
1
vote
1answer
136 views

Active Directory sysvol Check script using Powershell Jobs

I am working on a sysvol check script for active directory monitoring. Completed the script which checks connectivity to sysvol on all the domain controllers in the given domain. As part of this i am ...
0
votes
0answers
28 views

ActiveSync settings miss one iPhone

I am an admin of a Windows environment where we have an Exchange Server 2010 running on Win Server 2008. Exchange Active Sync is enabled so people can read their email on their mobile devices. For ...
3
votes
1answer
68 views

Trying to use powershell to selectively erase old backup files

I am working with a drive with thousands of backup files, many of which are just cluttering space. The program our employees use creates a backup of a spreadsheet every time they open one for ...
1
vote
1answer
72 views

Find certificate file expiration with powershell

I know how to do this normally, but the problem is all of the certs in question are not installed on my local machine. I have a source control directory where they all sit, and I need to iterate over ...
0
votes
0answers
17 views

How to load the parameters from the config file to powershell script [duplicate]

I am running powershell script by passing the arguments like below. .\generic-script5.ps1 10.120.28.164 dbname user1 Passw11 I want to call these parameters from the config file instead of ...
4
votes
2answers
330 views

Windows Server 2012 R2 and TCP slow start and Hyper-v hosts

I need to change default value of TCP InitialCongestionWindow I read this document: https://www.iispeed.com/blog/windows-server-2012-and-tcp-slow-start I tryed it on our hyper-v hosted virtual ...
-3
votes
1answer
52 views

How to remote onto networked PC using powershell [closed]

Is someone able to explain to me how I am able to connect onto a pc on the same network as my pc using powershell or a powershell script? for example my local pc is 192.168.1.250 and the remote pc is ...
0
votes
1answer
48 views

My script does not go to the next server

I'm trying to retrieve eventlog (with certain conditions) from multiple servers. It only checks the first server and does not move onto the next one. What is wrong with it? I tried different scripts ...
3
votes
2answers
2k views

How do you set an availability set for an existing VM in azure?

I am using the new Resource Manager type of virtual machine. Now I need to add this into a load balancer (already configured) but I can't find how to assign this VM into the Availability Set so I ...
0
votes
2answers
72 views

How to rename a non-AD computer remotely

I have the need to rename a non-ad computer that was just created with Hyper-V via Powershell scripts to a meaningful name before I connect it to the domain. I have the local username and password to ...
0
votes
1answer
42 views

Store two commands output to a variable in powershell

I have below command running in PowerShell. Get-ChildItem $sourcefs -Recurse -Exclude $exclude | Copy-Item -Destination {Join-Path "$destfs\$Bdate" $_.FullName.Substring($source.length)} I want to ...
-4
votes
1answer
85 views

Power shell script to get Computer Description + OU details [closed]

Power shell script to get Computer Description + OU details I do not get any output when I try PS C:\Windows\System32> Get-ADComputer -Computername "ABCD1DT001" I need to be able to get ...
1
vote
1answer
32 views

Need script to find error in sqlcmd script

I have below command to take the backup of sql database in windows and now we need to set exception handling code in it to trigger an email alert if any errors "sqlcmd -S $serverip -U $dbuser -P ...
0
votes
0answers
129 views

Schedule powershell script task doesn't Send-MailMessage

I am building a Powershell script to create a company synchronized email signature so I don't have to ask users to manually edit theirs when information changes. It is set up to grab the contents of ...
1
vote
1answer
36 views

Strange e-mail behavior in powershell

I'm adding a new powershell piece into my user creation, which is to e-mail their supervisor with an alert that they have been created. However, for some reason, it sends the credentials to the next ...
0
votes
0answers
46 views

ICACLS not working from PowerShell

I created a BAT file that executes this C:\Windows\system32\icacls.exe "F:\Users\username" /inheritance:r /T /C /Q It works fine. When I copy the command within a PowerShell, I get error ...
0
votes
1answer
74 views

powershell export local store certificate to pfx without password enters password

using certutil is pretty straight forward: certutil -exportpfx -p "" my serialnr path\to\hostname.pfx noroot I need to convert it from pfx to pem, so I need to do some scripting. This is what I ...
0
votes
1answer
44 views

Powershell ISE recognised the cmdlets but not in powershell console

In the powershell ISE we can run the cmdlets which are loaded from the modules defined in the script . But the same script is not working from the powershell console. Please let me know how to make ...
3
votes
2answers
295 views

Killing Parent and Child processes on Remote with Powershell

I'm attempting to kill a parent process and it's child process (There will only be one child) on a remote computer. When executing this script (Which is part of a larger one) i get the following ...
2
votes
1answer
87 views

Exception when running PSExec on remote computer

Running this command $processesToSpawn = 3 for($i= 1; $i -le $processesToSpawn; $i++){ psexec \\computername -i 2 -u "username" -p "password" "c:\myapp.exe" } Produces the ...
1
vote
0answers
66 views

Windows Management Framework 4.0 via GPO

I'm planning to set up a PowerShell-Masterserver. In order to do that I want to make sure that every Computer and Server running Windows 7 or Windows Server 2008 R2 has PowerShell 4.0 installed. To ...
0
votes
0answers
29 views

DNS server help not found in powershell?

I have run Update-Help on my Server Core 2012R2 machine, but when I run get-help on any cmdlets from the DNS server, it says it cannot find the help files on the computer and suggests running ...
0
votes
1answer
72 views

Windows PowerShell - How to view commands history date/time [closed]

I want to list entered commands in Windows PowerShell with their respective timestamps. How can I do it with Get-History command? Also if that isn't doable then please show me a way to check which ...
0
votes
1answer
88 views

Testing 3 conditions in Powershell IF statement is driving me batty

I'm trying to drive one of six outcomes from the combination of three variables being a '0' or '1' and I can't get the right output when testing three conditions no matter how I try. I've tried 3 ...
1
vote
0answers
31 views

Remote Desktop Farm Deployment ports

I'm in an environment where the firewall is very strict (as in every port is closed unless requested to be opened). When deploying my 2008 R2 Remote Desktop Farm through PowerShell I'm getting to ...
1
vote
1answer
119 views

Bulk import to AD powershell

I'm trying to import en employee list into AD using powershell. The script needs to update exisisting AD objects. The problem I have is that some users will have mobile number some internal numbers ...
1
vote
0answers
26 views

Hyper-V 2012 R2 x64 UpdateID

I'm trying to write a powershell script in order to manage my updates for multiple Hyper-V 2012 R2 machines. To problem i stumbled upon is that i am unable to find the updateId for it so i can manage ...
1
vote
2answers
46 views

How to connect to sql server to take backup of a database from powershell

I am new to powershell. I got requirement to take the backup of MS sql database backup from the other machine and not within the server. Can you please let me know what possible utilities required to ...
2
votes
2answers
138 views

Powershell Scripts works for 10 months, suddenly stops working

When I create my new users every week, I execute this powershell scripts I put together. It has been working like a charm for 10 months, but as of last week started throwing this strange error: ...
0
votes
2answers
200 views

Windows Server notify when installing updates finished

The Windows Servers in our environment (2008 R2 and 2012 R2) install updates automatically once a month, but don't restart automatically (yet), because the WSUS server should be the last server to ...
2
votes
1answer
379 views

Get-AzureRmResourceGroup not returning resources from current subscription

If I run Get-AzureSubscription -Current I get: SubscriptionId : a*<guid> SubscriptionName : Development Environment : AzureCloud ...
4
votes
1answer
185 views

No results when trying to populate array in a function

I am trying to use a function to populate an array with computer names to pass on to another part of a script. I am pinging all computer names in an OU and when it comes back as online, I would like ...