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

Access denied while settings FSRM quotas with powershell

I'm trying to set size quotas on the users personal directories in the organization. When using the Gui (fsrm snap-ins), everything works as expected. When trying to use powershell cmdlets to ...
2
votes
1answer
813 views

Get-ADUser -Properties MemberOf returns nothing

Something that is kind of weird that I haven't ran into before. We just did a domain migration and so now when I run a Get-ADUser {username} -Properties MemberOf against a standard user the MemberOf ...
1
vote
1answer
25 views

Large number of unmanagable groups in Exchange 2010 following migration from Exchange 2003

Recently we migrated from Exchange 2003 to 2010, and now we have many groups greyed out in the 2010 Exchange Management Console, because they are not Universal Groups. While these groups are ...
0
votes
0answers
43 views

Is it possible to create my own custom SQL 'trigger' with Powershell?

I'm familiar with MSSQL triggers already, however they aren't fine grained enough for what I want to do. In my scenario I want the trigger to fire after a row containing certain information lands in ...
1
vote
1answer
65 views

Using reflection in Powershell with different .NET framework versions

I am trying to reflect some assembly attributes from a .NET assembly. I am using Powershell 2.0, but the assembly was written using .NET Framework 4.5.1, so when I try the following command: ...
6
votes
1answer
234 views

How can I modify an existing scheduled task using Powershell?

I am working on some release automation scripts that use Powershell to update existing scheduled tasks which execute various applications. In my script, I can set the Path and Working Directory of the ...
0
votes
1answer
82 views

Powershell - Using a WHERE clause after an @{name alias not returning anything

Can I not use a WHERE in the pipe after an @{name alias? I have to use custom column headers in my output so I am using the @{name syntax. Later in the pipe, the sort works using the alias I've given ...
0
votes
1answer
185 views

Powershell: invoke-expression with “find”-command

I need to call DISM.exe via its absolute path which changes dependent on system architecture. Therefore, I store the filepath of dism.exe in a variable and then proceed to execute the wntire command ...
0
votes
2answers
101 views

Static IP injection to guest VM in Win2k8

Is there a way to inject IP address and do network configuration of a CentOS VM running on Windows server 2008? In Win2k12 there is SetGuestNetworkAdapterConfiguration using which IP address can be ...
0
votes
0answers
25 views

EventLog Source “Connect”. No events in EventLog

I'm baffled by this, as I can find no documentation on wether or not "Connect" or "Connection" is some kind of registered keyword for EventLog Sources. I'm trying to create an EventLog Source called ...
2
votes
0answers
42 views

Deploying Server 2012 with DNS role using WDS and answer file

I want to deploy an image using WDS on Server 2012. I will be using an answer file for unattended installation with little touch as possible. My answer file works great but I can't get the auto-logon ...
0
votes
0answers
129 views

Exchange 2013 Powershell: Setting up Public Folder Mailbox in multi-tenant topography

My exchange system has multiple habitats/tenants (i.e. domains). How do I set my public folder mailbox system? Do I set one up for each habitat (tenant)? If so, what is the syntax? Or do I set one ...
0
votes
1answer
76 views

CloudFormation powershell to run as domain admin + elevated priviledge

So... I'm writing some cloud formation templates. Using cfn-init, I get the machine to join the domain, and now I need to run in a Domain Admin context as local admin with elevated privilege to: ...
0
votes
1answer
53 views

Allowing multiple executables into a “Run only specified applications” group policy at one time

At my workplace we whitelist executables using a "Run only specified Windows applications" group policy applied to the domain. At certain times we need to whitelist large number of executables at a ...
1
vote
1answer
218 views

Some groups show no members in Get-ADGroup

So I have a question about strange PowerShell behavior with Get-ADGroup. If I use it on a group I created, I can get members just fine. But on some (not all) built in groups, including Domain Users, ...
2
votes
4answers
250 views

Different group policies in one domain

I'm using powershell to display the password expiration of an account before I reset it at work. But the global GP from what I can see, is 180 days, and there are some employees who have 90 days set ...
1
vote
1answer
206 views

Allow Enter-PSSession to work from local systems account

I have a PowerShell script that creates a Windows PowerShell session (PSSession) on a remote server via Enter-PSSession, both servers are not connected to a DOMAIN. This script is called from a ...
0
votes
1answer
48 views

Need looping Powershell script to email me when site has error message [closed]

Running 08 windows server on a VM We need to be notified by email or by other means whenever the site is either 404 or goes to maintenance page. Therefore, we need the script to be constantly ...
1
vote
1answer
1k views

Windows 2012 R2 RDS - can't change Connection Broker DNS round robin name via Powershell

I'm running into an issue when setting up a Windows 2012 R2 RDS Farm. I mistakenly set up my High Availability Connection Broker's DNS round robin name to something that didn't match my cert. I ...
4
votes
2answers
695 views

Install - Import PFX Certificate to separate local account's Personal store - Automated

I've been wrapping my head around automating a way to perform this task: We deploy Windows Server 2008 R2 images for our customers. We use PowerShell (version 2) to deploy our proprietary software ...
-1
votes
2answers
63 views

Prevent windows users from logging into, pinging, or browsing other workstations [closed]

Bluecoat security did an analysis of the Sony attack and says the following "This particular sample highlights the value of a network architecture where workstations cannot talk to each. While ...
3
votes
3answers
80 views

PowerShell: How to retrieve a specific property _exclusively_

How can I retrieve a specific property exclusively? I am aware of the select-object cmdlet which seems to be dowdy in that respect: PS C:\> Get-ADOrganizationalUnit -SearchBase ...
1
vote
3answers
775 views

Powershell Start-process -Argument list not working

Start-Transcript c:\scripts\InstallUpdates.log -Append # -NoClobber $SourceMSUFiles = (get-content install-list.txt | where {$_ -like "*.msu"}) #Install MSU files foreach($file in $SourceMSUFiles) { ...
4
votes
1answer
89 views

Look on all server desktops for outstanding files before deleting profiles

We have about 70 servers that we are in the process of moving into a domain environment, so we are converting our users from local accounts to domain controlled accounts. How can we determine which ...
0
votes
1answer
121 views

Dump user's Exchange mailbox to explorer while retaining folder structure

I have a user who will be retiring in a few days. He's been tasked with dumping out all mail that is related to the organization's customers and classifying it under our organizational structure ...
0
votes
1answer
249 views

WDS - Initial configuration using PowerShell

I am installing WDS on Windows server 2012 R2. I want to use PowerShell from start to finish. I can install the feature, but I cant't find a way to do the initial configuration from the shell. This ...
0
votes
1answer
194 views

Windows Server 2012 RD Licensing Issuing Multiple Temp Licenses Per Machine

I have just setup a Windows Server 2012 RDS environment with Per Device CALs. Looking at RD Licensing Manager it is handing out multiple temp CALS per machine and multiple permanent CALS per machine. ...
0
votes
1answer
109 views

Need to embed an existing object inside a PSObject

I have a module that does a "get" and returns some information from a VMware host. All the return information is in a NoteProperty. I'd like to add in an type into that PSObject so that I can pipe it ...
1
vote
2answers
99 views

Getting no query results in email

This is the powershell script below. I am trying to export the query's results into email body. However, the email contains nothing except the table headers. Could anyone help out what could be wrong ...
-1
votes
1answer
82 views

Running powershell like a process to monitor for event changes

I would like to have powershell manage network profiles for me depending on where I connect to. Mostly for my three work locations I jump between. I need specific IP off the wireless networks so I can ...
0
votes
1answer
45 views

interpret unknown piece of powershell related to SQL Server

I am migrating from SQL 2008 on Win2003 to SQL 2014 on Win2012. One of the jobs from the old system has this step: if ('$(ESCAPE_SQUOTE(INST))' -eq 'MSSQLSERVER') {$a = '\DEFAULT'} ELSE {$a = ''}; ...
1
vote
3answers
143 views

How to change windows time server on windows server 2012?

In windows computer, system is using "time.windows.com" to sync the time. I need o modify the time server for windows user on its logon and want to enforce using group policy. Case: we have windows ...
0
votes
1answer
109 views

Assigning Department based on Active Directory OU's

We have just gone to Office 365 tied in with ADFS. We want to be able to see people's departments automatically when we view their contact info in Office 365. We do not have any Department ...
2
votes
1answer
200 views

FSRM powershell behavior

I'm working on a script I can push out to a few dozen Windows Server 2012/2012R2 servers to enable FSRM File Screens that will write an alert to the event log when they detect a particular filename ...
0
votes
0answers
233 views

azure powershell run customscriptextension - powershell exit code 1 - works from Azure Portal

I’ve been working on automation for Azure VM deployment with the Microsoft CustomScriptExtension for VMs. http ...
0
votes
1answer
249 views

Powershell script to display all groups and the users they contain [duplicate]

I'm currently trying to write a script that displays each group and user in the domain. Import-Module ActiveDirectory $Groups = (Get-AdGroup -filter * | Where {$_.name -like "**"} | select ...
0
votes
2answers
134 views

Powershell script to display all groups and their users

I'm currently trying to write a script that displays each group and user in the domain. Import-Module ActiveDirectory $Groups = (Get-AdGroup -filter * | Where {$_.name -like "**"} | select ...
2
votes
2answers
900 views

Logoff Script on Remote Desktop Services

I have a Remote Desktop services running on Server 2012 R2. My timeout settings have been set to end a session 60 minute after disconnection. This is good for all the users except one: That user's ...
2
votes
1answer
4k views

Sending mail notifications from Windows Server 2003 Powershell 2.0 to Office 365

My script is meant to suck up errors in scheduled tasks that don't complete correctly and sends them to my email address via Office365: $reportHTML = Get-Content C:\windows\tasks\SchedLgU.Txt | ...
0
votes
1answer
110 views

connect to ipsec vpn on sonicwall device from a powershell script: Guidance?

Win2012-R2 We have a vpn network device that can surface ipsec and pptp vpn endpoints. I can see docs for various vpn commands in powershell, e.g. ...
1
vote
0answers
157 views

Stop automatic reboot with gpedit shutdown script in Windows 2k8

I am search for a way to validate and maybe stop an automatic reboot under windows. E.g. automatic reboot is initialized by windows update. When adding a shutdown script with gpedit this script gets ...
1
vote
1answer
164 views

Powershell Command to restart/reload a script within Else statement

I'm creating a powershell script to repair or re-install a client remotely based upon the users input (basic script example below): $env:COMPUTERNAME = Read-Host 'Please enter hostname' ...
1
vote
2answers
2k views

Remote PS session fails on non-domain server

I'm trying to connect to a non-domain joined remote Win2008R2 server using PS from a Win8 host (same subnet, it's a local VM). Tried everything I could find, nothing works. SERVER: PS ...
1
vote
1answer
1k views

PathTooLongException error when using Get-ChildItem

I'm trying to generate a list of all known file on a file share with Attributes "Archive + Offline". But I keep running into PathTooLongException errors. So far I've only found that Robocopy can work ...
0
votes
0answers
96 views

Invoke-GPUpdate fails even with firewall disabled

PS C:\Users\Administrator> Invoke-GPUpdate -Computer rim-23 Invoke-GPUpdate : Computer "rim-23" is not responding. The target computer is either turned off or Remote Scheduled Tasks Management ...
1
vote
0answers
828 views

Move-ADObject : The operation could not be performed because the object's parent is either uninstantiated or deleted

PS C:\Users\Administrator> Get-ADComputer NAME | Move-ADObject -TargetPath "OU=SERVERS,OU=COUNTY, OU=STATE,OU=REGION,OU=COUNTRY,DC=subdomain,DC=mydomain,DC=com" However, I am getting this: ...
2
votes
1answer
51 views

MoveDataPowerShellHost.exe missing from sbserver

We are getting a lot of errors in our eventlog that indicates our sbsmonitoring DB is too big. I've had this once before, so I found a method to recreate that DB. In order to do that, I need a ...
2
votes
2answers
1k views

Can't access Azure VM via RDP any more

I set up an Windows Server VM on Azure last year and after having not logged in for a couple of months I tried to log in recently and strangely it told me my password was incorrect. I proceeded to ...
4
votes
1answer
281 views

Unable to rename computer with powershell

$script = { Rename-Computer -ComputerName "ADMINIS-ID1PS7V" -NewName "SERVER1" } $computerName = "ADMINIS-ID1PS7V" $username = "Administrator" $pw = "123!@#qaZ" # Create Credentials $securepw = ...
0
votes
1answer
120 views

Moving computer with powershell in MDT

I have MDT 2013 deploying several images. With Powershell I would like to move them to the correct OU as well. Is that possible? I was trying with the following but it does not seem to work: ...