-1
votes
1answer
36 views

Best Practices for User folder permissions [closed]

The following is my bat file. Is there a way I can substitute First.Last with usernames from a CSV file? My boss doesn't want to do all the users at once. He's afraid that something may happen so he's ...
-2
votes
1answer
54 views

powershell script that outputs date of the day as a file name

I have a script which lists local admins of all hosts in Active Directory below: $Searcher = New-Object DirectoryServices.DirectorySearcher([ADSI]"") $Searcher.Filter = "(objectClass=computer)" ...
1
vote
1answer
59 views

Force active directory replication after joining a server to a domain?

I'm trying to create more 'self-service' virtual machines for the developers to use. On of the requirements is after running a script to bootstrap the machine and join it to the domain, that the ...
0
votes
1answer
79 views

Grant user write access to DNS Server (Win2k8)

I want to remotely manipulate DNS records via Powershell scripts and I use the following script: $zone='company.local' $dnsrecord='dummyDNSrecord.company.local' $rec=Get-WmiObject -ComputerName ...
6
votes
2answers
215 views

How to print out information about Task Scheduler in powershell script?

I am trying to print out information from the Task Scheduler from the local computer in a PowerShell script so other users can print out this information as well and not have to access the Task ...
5
votes
4answers
186 views

powershell vs GPO for installation, configuration, maintenance

My question is about using powershell scripts to install, configure, update and maintain Windows 7 Pro/Ent workstations in a 2008R2 domain, versus using GPO/ADMX/msi. Here's the situation: Because ...
1
vote
1answer
109 views

Save Custom View from Event Viewer in .evtx

I have a Custom View in the Event Viewer with a couple of Event id's. I know you can save those event id's in an .evtx file to open it. This proces has to be executed manually. Now is my question, how ...
3
votes
1answer
534 views

Script to export custom view Event Viewer to .evtx Powershell

This is my PowerShell script to export data from a Custom View in the Event Viewer via the XML data. set-executionpolicy unrestricted [xml]$CustomView = @" <QueryList> <Query Id="0" ...
3
votes
2answers
93 views

Enumerate Windows DNS Server Zone attributes via shell

I'd like to use a command-line tool to list a (primary) zone's configured secondary servers, if any. Dnscmd comes close with: dnscmd server /ZoneResetSecondaries:[list of secondaries] But, I ...
3
votes
2answers
167 views

Best way to deploy Powershell 4.0 on Windows 7 sp1 and server 2008

I am planning to deploy powershell 4.0 on all Win 7 and server 2008 and 2008R2. I did some research about this, but couldn't find the official way to do it. I can just use batch file or GPO to ...
1
vote
3answers
87 views

Displaying all groups that a user from another domain is a member of

My team and I are stumped on this one. We have two domains at work, OldDomain and NewDomain. We are working on migrating from OldDomain to NewDomain as mandated by ParentCompany. The trust is one ...
0
votes
0answers
71 views

ssh from osx to windows server: how to increase buffer size?

I need to allow mac users to connect to a Windows Server 2008 machine via ssh. I am using freesshd as my ssh server, and have set powershell.exe as my command shell in freesshd (so that they can use ...
1
vote
2answers
451 views

Power shell script to fetch disk space on all servers in timely intervals

I got a Powershell script from here which will export Disk Space usage to html file. I want the scritp to give usage in timely intervals say each 15 mins or 30 mins. is there any way we can mod this ...
3
votes
4answers
118 views

powershell script waits for printing output until I press a button

I wrote a PS1 script that will count how many processes (in this case MS Project) are running on a Citrix farm. The code it's: $variable=(query farm /process | where { $_.Contains("WINPROJ") } | ...
2
votes
1answer
337 views

Powershell script runs in an infinite loop when executed a certain way

I'm using the Exec Powershell provider for Puppet to run some powershell scripts. I'm having an issue with the way it executes my script. The method of execution causes the script to run over, and ...
3
votes
1answer
310 views

SCCM WMI Get Patches that require reboot

How can i get all patches that require a reboot before running the install process using WMI and SCCM. So far i have this wmi query that lists all the available patches but none of the properties ...
2
votes
1answer
431 views

How to delete event source windows 2008

I would like to delete an event source in windows 2008. I don't want to delete the log event, just the source. How do I do that? I don't find any command i PowerShell that does that. PS > gcm ...
1
vote
1answer
362 views

Full Information from Terminal Services Manager (tsadmin.msc) via command line

I would like to get the full session information that is presented in the Terminal Services Manager via the command line or PowerShell (so that it can be used in automation) or at the very least the ...
2
votes
2answers
1k views

How to force tomcat to shutdown after x number of seconds on windows?

On linux systems the stop command in catalina.sh accepts a timeout parameter which forcibly kills tomcat after the supplied number of seconds. The catalina.bat however doesn't seem to have a parameter ...
1
vote
1answer
206 views

PowerShell Snap-In for IIS 7.0 IIsProviderSnapIn vs WebAdministration

I am attempting to install the Windows PowerShell Snap-In for IIS 7.0 on a server running server 2008 with service pack 2 installed, so I can use the WebAdministration snappin. On Installation I'm ...
3
votes
1answer
185 views

Using Powershell (RSAT) to reset passwords in AD (Win Server 2008)

I am using a powershell script I found online, trying to use a win7 cpu to remotely change passwords on a Windows Server 2008 via RSAT. Right now, the server 2008 and win7 are VM's, and the win7 cpu ...
2
votes
2answers
112 views

Can you use Powershell Remotely to reset AD passwords for Server 2008

Young intern here with a powershell project. My goal is to use a domain computer with administrative [domain] rights to reset user passwords in AD from our server. In order to do so, I have installed ...
1
vote
1answer
280 views

IIS Powershell : Assign an existing SSL binding to a website

I already have an SSL binding created for one of my websites in IIS 7.5. Now I'm adding another website which listens on the same IP and port (443) but uses a different host header. When I try to ...
2
votes
1answer
93 views

Microsoft Exchange Management console, Initilization Failed

Upon starting Exchange Management Console I am presented with the error [###################] Connecting to remote server failed with the following error message : The WinRM client sent a request to ...
0
votes
1answer
1k views

Remove AD User account with powershell fails

Am trying to delete a list of accounts that are either no longer needed or people who have left our employ. I was thinking powershell would be the easiest and so far have the following script to ...
0
votes
1answer
246 views

Restart a service, and its dependents remotely in Windows

Normally after running Windows updates there are a few servers in our infrastructure that our monitoring software (SolarWinds) shows as having problems. Normally this is flagged as being the netman ...
2
votes
3answers
1k views

Export Windows Server configuration to powershell script?

I'm looking for a way to export role/feature configuration to a scriptfile, like powershell. Lets say you've installed the DHCP-Role. You configure the scopes, reservations and all that stuff you ...
1
vote
1answer
57 views

Automating windows server 2008 installation in hyper V with powershell

I often set up servers in Hyper V on my laptop (running windows server 2008) to test varoius software. Is there a way in powershell to build an image in Hyper V and run windows update on that image? ...
2
votes
1answer
917 views

Powershell remoting to a server using CNAME, not COMPUTER NAME

I am trying to get powershell remoting to work with a server using it's CNAME rather than the computer name. Both local and remote machines are on the same network and domain. I have enabled ...
0
votes
1answer
65 views

single or set of patches from windows update?

Is there a way to install several patches by kb or other means and only install those specific without manually downloading the patches? I want to use automatic update services but don't want every ...
2
votes
2answers
346 views

powershell call operator with multiple arguments?

I am trying to use the powershell call operator to essentially run the following command: "C:\Program Files (x86)\PuTTY\plink.exe" "-v -agent -m C:\Scripts\idrac_powerup_commands.txt ...
2
votes
3answers
832 views

Permissions Issue? Putty + Plink + Pageant + Powershell + Scheduled Task

Background I have the following components: A windows server 2008 R2 box An administrator account (mine) A service account on the domain that is an Administrator of the box An installation of ...
0
votes
1answer
84 views

Pinging the hostname of the server I'm on does not reach out to DNS, responds with 'lowest' numerical IP

For example: Server: server1.contoso.com IPs present on server: Initially configured statically with 10.10.20.100, it had two additional IPs added to the same NIC, 10.10.20.20 and 10.10.20.102. A ...
0
votes
3answers
447 views

How to use powershell to check the location of user profile locations on the server?

Is it possible to find all the users profiles that are not on a certain server/folder using powershell and regular expressions? If so how would one go about this?
0
votes
1answer
243 views

Unable to create zip files with shell.application [closed]

The following example doesn't seem to work on my Windows Server 2008 SP2 nor my Windows 7 Pro Sp1. Command: $shellapp = new-object -com shell.application $shellapp Output: Application ...
1
vote
2answers
467 views

Exchange 2010 - Mailbox Export much larger than actual size

I issue this command to export the mailbox of a user: New-MailboxExportRequest -Mailbox "user" -FilePath "\\server\share\user.pst" After 2 minutes or so, this file have been generated: Notice the ...
2
votes
1answer
772 views

Specify Powershell to run on .NET 3.5 after WMF 3.0 install

I just installed the .NET Framework 4.0 and WMF 3.0 on a Server 2008 R2 SP1 machine that has SharePoint Foundation 2010 installed on it. Now, when I go to Start - All Programs - Microsoft SharePoint ...
2
votes
2answers
2k views

Powershell wait for compressing to finish

I have written a PowerShell script that zips the contents of a folder and sends it to a server for backup. The issue is that the copy process doesn't wait for the zip process to finish. I have tried ...
1
vote
3answers
3k views

Get OS architecture remotely via PowerShell

Does anybody know how to grab OS architecture remotely from multiple Windows hosts via PowerShell?
1
vote
1answer
654 views

Is it possible for a Powershell script to return the Last Run Result from Windows 2008 task scheduler?

I've setup a scheduled task on a Windows 2008 Server with two actions. The first action is to run an application which connects to a SQL database and generates XML files. The second action is to run a ...
1
vote
1answer
127 views

legitimacy of the tasks in the task scheduler

Is there a way to know the source and legitimacy of the tasks in the task scheduler in windows server 2008 and 2003? Can I check if the task was added by Microsoft (ie: from sccm) or by a 3rd party ...
1
vote
2answers
1k views

Get detailed network adapter information using PowerShell

Is there an alternative to Get-NetAdapterRss that can be used on Windows Server 08/03/etc.? I'm looking to query NIC information from servers with a powershell script, but cannot seem to find how to ...
1
vote
3answers
2k views

Why does powershell -command “Restart-Service Tomcat6” fail when run from a Scheduled Task?

I get the following error in the Scheduled Task history when I try to run a task: Task Scheduler successfully completed task "\Restart Tomcat" , instance "{264b4620-5f3b-6c5f-a6cb-1625a7fa57de}" , ...
3
votes
1answer
505 views

How can I systematically shut down Windows services in order?

We have this open source application that has three (3) services. For the purpose of this question, let's call them A, B, and C. Now, they have to be shut down in a specific order. That order would ...
3
votes
2answers
1k views

Remotely run a script invoking “Run As Administrator”

This is as close to the exact question that I have, but looks like he found another way that fits the needs so it has been marked as answered: I have a Powershell script running on server A that I ...
2
votes
2answers
78 views

Using PowerShell Restart-Service cmdlet with a service that has an instance name

I want to restart a service on a remote machine using PowerShell. The service has both a displayname and an instancename. Can I use the Restart-Service cmdlet to do this? I don't see an instancename ...
2
votes
1answer
224 views

Console dump of a DCOM configuration for a given GUID?

Is there a way to dump the DCOM settings for a given DCOM object on the command line, if the GUID is known? (Maybe using PowerShell)
8
votes
1answer
191 views

Is there a version of the AD tools that provide the PowerShell output, similar to the Exchange tools?

The Exchange administration tools output the exact PS commands they will (or just did) execute. Is there a different version of the AD tools (primarily AD Users & Computers) that have similar ...
3
votes
2answers
275 views

How to monitor a Windows process' working set greater than 4GB?

Apparently the .NET framework has a bug that prevents working set values above 2GB from accurately being determined. Between 2 and 4GB one can apply some xor-ing calculation to obtain the value, but ...
-1
votes
1answer
67 views

Automate Monitor string in different log files

I have few log files in different servers and I want to check output in the end of those log files for e.g . success: 4000 failed: 200 These logs files are getting generated daily and I have to keep ...