3
votes
1answer
49 views

Edit local policy via powershell

i'm searching for a way to edit this policy via powershell : Computer Configuration -> Administrative Templates -> System -> Credentials Delegation -> Allow Delegating Fresh Credentials with ...
3
votes
2answers
103 views

Ensure drive is mapped at login on laptop with strictly wireless

So, $software runs on a 'server' (windows client w/ file sharing to share out the db folder), and laptop client has the drive mapped and $software also installed. This is the vendor's recommended ...
0
votes
0answers
28 views

Run active directory logon script as an admin user [duplicate]

I have a logon (powershell)script for a certain non-admin user. The script retrieves some files from a server and places them in certain folders on the machine (and some other stuff as well). I don't ...
3
votes
1answer
174 views

What is causing the Collateral damage when deleting old profiles?

#Get user names that have logged onto workstation $Users = gwmi win32_networkloginprofile | where {$_.name -match "EXP\\"} | where {$_.name -notmatch "srvtasksched"} $Users | foreach{ $Name = ...
3
votes
2answers
136 views

Make windows all in capitals for specific application

Is there a method where I can set windows transparently to caps preferrably when a specific application is run. For bonus points, I should be able to revert back to normal (non capslock mode) when ...
1
vote
1answer
104 views

Unregistered a computer with the domain controller using powershell?

From what I understand when you add a computer to the domain, via Computer->Properties->Advanced system settings->System Properties->Computer Name->Network ID, it gets registered with ...
2
votes
2answers
1k views

Adding a DNS A record to a Win 2008R2 server from an Win 2008R2 server or Win7 via Powershell

I recently discovered that it is possible to simply automate DNS entry administration with a nice cmdlet: Import-Module DnsServer Add-DnsServerResourceRecordA -Name mail2 -IPv4Address 192.168.0.10 ...
2
votes
1answer
664 views

How can I set audit controls on files owned by TrustedInstaller using Powershell?

I am trying to set audit controls on a number of files (listed in ACLsWin.txt) located in \%Windows%\System32 (for example, aaclient.dll) using the following Powershell script: $FileList = ...
0
votes
1answer
52 views

Phantom Windows PowerShell profile on Windows 7 Enterprise 64-bit

When I start Windows PowerShell in Windows 7 Enterprise 64-bit, it runs an (incorrect) profile -- but I cannot see that PowerShell code in any of my Windows PowerShell profile files. [edit...] So ...
2
votes
2answers
438 views

Schtasks — what is wrong with the following command

The following script schedules successfully but will not actually, you know, restart the server. schtasks /create /tn "restart test" /ru "domain\admin" /rp supersecret /sc once /st 11:35 /tr ...
1
vote
1answer
180 views

Pass unlock credentials to powershell script

I have a powershell script that is run as a scheduled task and is triggered to run "On workstation unlock". The script is programmed to reconnect an SSTP VPN connection if the connection becomes ...
3
votes
1answer
312 views

How to load MSMQ cmdlets in Windows 7?

Technet has a nice article (Windows PowerShell for Windows Server 2012 and Windows 8) listing a myriad of PowerShell cmdlets available on the latest OSes. Often there are easy (or not so easy:-) ways ...
1
vote
2answers
483 views

Missing 'HKCU:\Network' subkey when browsing registry remotely with PowerShell

I'm trying to clean up a big mess of random mapped network drives. All our network drives have been mapped on a per-user basis (causing gwmi win32_mappedlogicaldisk to come up empty). I'm trying to ...
1
vote
4answers
1k views

Server 2012 GPO: PowerShell Script on Computer Startup not running

I've got a couple of Server 2012 instances on Amazon EC2 and I'm in the process of setting up the GPOs. All of the settings of the GPOs are being applied fine, except none of the PowerShell scripts ...
0
votes
1answer
606 views

Exception Enumerating SQL Server Instances with SMO WMI ManagedComputer

I'm trying to use the SMO WMI API/objects in PowerShell 2.0 on Windows 7 with SQL Server 2008 R2 installed to get a list of SQL Server instances on the local computer using the Managed Comuter object. ...
2
votes
1answer
184 views

Is there a cmd/certutils to copy a certificate from one store to another?

I would like to know if there is a cmd to copy an existing certificate from one store to another. I am trying to copy a certificate from the Users Intermediate Certification Authorities store ...
1
vote
1answer
168 views

How to install RSAT on remote Windows 7 workstations using Powershell in 2003 AD

How do I install and enable RSAT tools on remote Windows 7 Workstations using Powershell? Actually this process I think has 2 parts: Installing the tools Enabling the features; How can this be ...
2
votes
1answer
755 views

Powershell VMWare Script not running from Scheduled Task

Background / Goal I am attempting to create a scheduled task that will: Run at the specified time (once) Run a PowerShell script that: Logs all of its output as a transcript Connects to my vCenter ...
1
vote
0answers
276 views

How to install Admin tools on Windows 7 and Windows XP workstations via powershell?

we have around 250 workstation(mix of windows 7 and XP SP3) ; we are delegating those users some admin tasks via task pads and they need admin tool pack(containing AD tools such as dsa.msc etc) for ...
4
votes
2answers
312 views

Powershell script to copy file named 'dat' from multiple folders

I am trying to copy a file named 'dat'. This file has no extension. The thing is though that under a Parent Folder 'Personal' I have 500 folders and all of these 500 folders have the 'dat' file. I am ...
1
vote
1answer
191 views

Install Active Directory Module for Powershell without Installing RSAT?

I would like to use the Active Directory Module for Powershell, but it seems that I first have to install RSAT, which is a rather large package. Is it possible to just install this one feature?
1
vote
2answers
950 views

Delete Computer Object in AD with Powershell?

I am able to use the native add-computer cmdlet to join a computer to a domain, but it seems that this cmdlet fails if the systems already exists in AD, and you are trying to add it to a different ...
3
votes
1answer
1k views

How to use new-smbshare with Powershell 3.0 on Windows 7?

I installed Windows Management Framework 3.0 on a Windows 7 machine and tried to use the New-SMBShare cmdlet but when I ran get-command new-smb*, no cmdlets were found. How can I use this new cmdlet ...
2
votes
2answers
769 views

My powershell script wont save a file when run using Task Scheduler, do I need to specify a specific argument?

I have a script that downloads a temporary Excel file, copies parts of it to a new file, and saves it to a specific location on the network. The problem I'm having is that the new file is never ...
1
vote
1answer
883 views

Get-WinEvent only works on Vista+ as source and target?

I originally assumed Get-WinEvent cannot be executed on Windows 2003, i.e. source computer must be Vista or later OS. However, it can be ran against a Windows 2003, from a Vista+ computer. It appears ...
1
vote
2answers
251 views

netsh doesn't provide commands

According to Netsh Commands for Wired Local Area Network (LAN) in Windows Server 2008 and Windows Server 2008 R2, netsh should provide commands such as netsh add profile filename="profile.xml" ...
0
votes
1answer
473 views

How to add powershell script to Windows 7 Home Premium startup?

Win 7 Home Premium doesn't have gpedit.msc as you know so, how to add startup script to Windows? Start Menu entry doesn't work cause i need to have administrative rights for the script to run
2
votes
1answer
80 views

Are there any good open source developer machine setup scripts for windows/c# development?

I've used thoughtbot's laptop setup script to setup my mac for ruby develpment in the past. Is there anything similar out there for windows/c# development? Something that sets up IIS, installs visual ...
7
votes
3answers
25k views

Is ServerManager module available on Windows 7?

Is ServerManager module available on Windows 7 Ultimate ? I think (but I'm not sure because I never looked at output before) the PS script that I have worked before but after some problems with IIS7 ...
3
votes
1answer
501 views

Adding a self-signed cert into trusted certificates list with powershell on Windows 7

I created a self-signed certificate on Windows 7 and deployed a web site with this certificate just to try it out. When I configured the HTTPS endpoint and visit the site with HTTPS protocol, I get ...
1
vote
1answer
529 views

Folder with a million files - how to use Powershell to limit the returned file list to a maximum number of files and avoid the hours-long wait?

I have a directory that inadvertently had about 1.4 million files generated into it. I want to list just the first, say, 100 items, but without the underlying process trying to read the entire ...
1
vote
1answer
357 views

Hide powershell.exe from the desktop when its start

Greeting, I have this code that will run when windows startup. The code simply will kill explorer.exe and start remote desktop connection program even a user exit the program it will be restart again. ...
1
vote
1answer
377 views

Re-run remote desktop after a user log off from the server

Greeting, I have about 20 PCs with windows 7 home edition and I want users when turn on these PCs have only one option to connect to the server using remote desktop connection. I wrote a power-shell ...
0
votes
1answer
536 views

Use Powershell to read XML comments

So I'm working on a way to use Powershell to get a list of scheduled tasks. Through my research, I determined that the only way to get "most" tasks is to use SCHTASKS. This command does allow for XML ...
2
votes
1answer
911 views

How do I register a user logon script using PowerShell?

My company manufactures a medical instrument and the software that runs on it. Under the hood, it's got a PC running Windows 7. I'm developing a process so that untrained technicians can configure the ...
8
votes
1answer
3k views

Remotely renaming a domained Win 7 computer

I'm having a hard time figuring out how to rename a Windows 7 computer remotely. This is for automating Win 7 builds in a vSphere 5 environment, and I'm trying to get it as hands-off as I can. So far ...
0
votes
1answer
467 views

Has anyone used WMI_OfflineFilesCache::RenameItem to rename offline files?

The reason I ask is that I have been researching how to rename items once an offline files target has been changed. It seems that so far there are two options: CSCCMD.exe - Which appears to be a ...
5
votes
6answers
2k views

How do I monitor who's logged in?

We in our department are implementing a new admin policy: everyone in a department which we support will receive admin access to their computers. We need to know (while we are performing this "pilot ...
5
votes
1answer
2k views

Powershell script to find if a user has logged in since last reboot

So I've been working on a Powershell script that needs to detect if an interactive logon has happened since the last reboot. I can force the system to restart before I launch the task, but I'd like to ...
1
vote
2answers
690 views

Powershell ExecutionPolicy mysteriously resets

I am well versed in the ways of Set-ExecutionPolicy RemoteSigned etc. But for some reason, my machine resets the policy every so often. I have not been able to figure out the pattern, but every ...
2
votes
2answers
435 views

access windows 7 Libraries with Powershell

do you know some way to navigate trough windows libraries in Powershell?, exist some provider? it will be nice have this posibility because in libraries i have everything that i need almost in one ore ...
0
votes
4answers
468 views

Ensure a process is running on a remote computer

We have about ten client computers ranging from Windows XP to Windows 7 that have a little program that runs in the tray. This program needs to be running at all times and sometimes it either crashes ...
1
vote
1answer
2k views

How do I create a Managed Service Account in Windows 7

I'm trying to create a Managed Service Account on Windows 7. I've followed the steps in the guide to Managed Service Accounts to enable the Active Directory Powershell snap-in. The first thing I ...
1
vote
4answers
3k views

How do I run a powershell with a Windows form at logon / startup?

I'm putting together a powershell (running on Windows 7) which performs some configuration tasks post-image. It uses windows forms to get some user input and then should run various tasks depending ...
6
votes
4answers
4k views

Query schtasks using Powershell

On a Windows7 machine I am trying I can run a query to view all the scheduled tasks using schtasks.exe This is fine but I would also like to filter the result set using something like schtasks ...
2
votes
2answers
1k views

Power Shell does not like command

Any ideas what I did wrong here? I copied this script from a tutorial and get this error.... PS C:\Windows\system32> Get-Service | Where-Object ($_.status -eq "running") Where-Object : Cannot ...
3
votes
2answers
2k views

How do I make wallpaper fit both monitors in dual monitor setup?

I am deploying some custom corporate wallpaper as part of a Windows 7 rollout. Some people will be using dual monitors, and the additional monitors may be either 4:3 or widescreen. I want to use the ...
7
votes
7answers
31k views

How do I turn windows features on or off using powershell or commandline in windows 7?

I have scripted against sysocmgr in windows xp, servermanagercmd in server 2008, and now I find that I have to use a new powershell module servermanager to install features on Server 2008 R2 and so I ...