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)

2
votes
1answer
33 views

How to know the current script FullName [closed]

My script call many other script and i need know each fullname (for log info). but the same command doesn't work in Powershell_ISE
-2
votes
1answer
57 views

Active Directory/Exchange list users and mobile numbers

How can I use Active Directory Powershell or Exchange Management Shell to list all users and they're mobile numbers?
0
votes
3answers
60 views

powershell script to clean up ftp user folders

we have an ftp server with 50 users, they have a main folder(as below) and 5 sub folders. I am looking for a script that will clean the contents of the sub folders on a weekly basis. However not touch ...
0
votes
0answers
44 views

How do I perform a remote service stop and Postgresql backup using powershell?

I am having some difficulty with a Powershell script. The script runs nightly to perform a backup of a Postgresql db. I used WinRM to allow the server running the script to perform the service ...
0
votes
0answers
103 views

Cannot reset password on Azure Linux VM using Resource Manager (ARM) model

I have an Ubuntu VM setup under the Azure Resource Manager (ARM) model that, after an unexpected reboot, I have lost access to as the existing password magically stopped working. After trying to ...
0
votes
0answers
21 views

Using PowerShell Script to Connect to Multiple Azure Subscription and Delete Services

You cannot vote on your own post 0 I am looking for a PowerShell Script that will connect to multiple Azure subscriptions each with a unique login and password and delete all VNets, All VMs by using ...
1
vote
1answer
52 views

Cannot expand the folder

Boss wants access to all staff mailboxes (31 users). I've added full access permissions for each mailbox via powershell: Add-MailboxPermission -Identity "STAFF" -User" "BOSS" -AccessRights ...
1
vote
0answers
58 views

How to do I create linux VM with ssh public on azure automation

Right now, I am creating Linux VM without public key on azure automation. My aim is to create linux VM with ssh public key on azure automation. How to get ssh public key from "accets" on azure ...
1
vote
1answer
83 views

Add Startup and shutdown scripts to Local Group Policy using Powershell

I am trying to automate adding startup and shutdown scripts to Local Group Policy (gpedit.msc). One solution is to write to registry directly as pointed out in ...
1
vote
1answer
109 views

How can I use IIS administration commandlets on Windows Server 2012 R2?

I'm trying to use IIS administration commandlets such as Get-IISSite on a Windows Server 2012 R2 computer. I've already installed IIS Server and all IIS Management Tools roles and rebooted the ...
1
vote
1answer
520 views

Add-AzureAccount : unknown_user_type: Unknown User Type on azure automation

I am getting following error on azure automation when I trying to connect VM. Also follow this link ...
2
votes
2answers
100 views

ICACLS in powershell script 50% working

I have an ICACLS command running within a powershell script. The script creates a new folder on a server share, creates a new security group in AD and then runs ICACLS to provision the folder. When I ...
0
votes
0answers
46 views

Deny a specific update in wsus, using powershell and his knowledge base code

does anyone know if and how in powershell you can deny wsus updates searching for the knowledge base code? for example: Get-WsusUpdate -kb kb3035583 | Deny-WsusUpdate
0
votes
2answers
48 views

Detailed Help for Azure Powershell Cmdlets v1.x

I'm running the following Azure powershell cmdlets: PS C:\> (Get-Module -Name Azure).Version Major Minor Build Revision ----- ----- ----- -------- 1 0 1 -1 PS C:\> ...
3
votes
1answer
81 views

Convert to HTML the output of Powershell

I have been working on a Powershell Script that generates email of the Windows backup event. The problem is the formatting looks bad. Subject: Computer name status [backup was successful] Tuesday, ...
0
votes
1answer
108 views

Sending a Maintenance Message to Citrix Xenapp Users via Powershell

I am trying to send a message to XenApp users via Powershell cmdlet send-xasessionmessage. The environment contains approx. 100 servers with 1000 active sessions. The script is very slow. When I test ...
3
votes
2answers
47 views

Rename VPN Connections via Powershell

I'm trying to batch rename vpn connections on my Windows 8.1 machine. I have no trouble modifying the server address with Set-VpnConnection, but I can't find a way to rename a vpn connection: First ...
3
votes
1answer
592 views

Azure Cmdlet Add-AzureRmAccount not working over corporate line

I'm currently learning how to create azure environments using powershell Resource Management cmdlets. The classic way of working had no problems, I could use Add-AzureAccount and it would allow me to ...
1
vote
2answers
210 views

how to access a unix machine from windows command prompt

I have created a Vyatta virtual machine on my Hyper-V server, but I didn't enable ssh on that virtual machine. I want to connect to that machine without enabling the ssh and execute some shell ...
3
votes
2answers
616 views

What's the difference between Get-AzureRmVM and Get-AzureVM

I'm trying to set up a Load Balancer on Azure. I'm following this doc. At the end, you basically have to attach your virtual network adapter to a running VM. The docs refer to using Get-AzureRmVM ...
1
vote
0answers
156 views

PowerShell: Populating TreeView with Directory Hierarchy

So I'm attempting to write a PowerShell script with a GUI input; idea being that the end users see a nested TreeView of the file system. They tick a some folders, hit a button, ...magic happens. I ...
1
vote
2answers
54 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
625 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
452 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
294 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
82 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
95 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
51 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
170 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
39 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
30 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
84 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
77 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
43 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
76 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
92 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
68 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
194 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
46 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
130 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
26 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
66 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
290 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
47 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 ...
2
votes
3answers
1k 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
66 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
39 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 ...