4
votes
1answer
49 views

Powershell Get-Process negative memory value

I was making some verifications with Powershell Get-Process cmdlet and got some weird values about some processes. I tested on a server with a SQL Server Instance running and consuming 3GB+ RAM as ...
0
votes
1answer
33 views

Copy specific files listed in a CSV file

I'm working in a Windows 2008 R2 Server and I'm trying to copy certain files listed in a csv file from one partition to another, headers are: ZipFile,Site.A,Site.B ZipFile column contains the ...
-1
votes
1answer
25 views

Powershell Security Groups

Active Directory via powershell want to add users to a specific group. But that is a member of a particular group of users that other members do not want to be included in the relevant group. For ...
-1
votes
0answers
31 views

How to access Virtual machine using powershell script

I want to access the virtual machine using powershell script. For that I used below script, Enter-PSSession -computername sheetal-VDD -credential compose04.com\abc.xyz1 where, sheetal-VDD is ...
-2
votes
0answers
31 views

Powershell Copy Function very slow

We have a main files server for a local office, I placed a ESXI host in one of our data centres, I used the recursive copy function to create a small powershell script, and scheduled this for 9pm. For ...
0
votes
1answer
66 views

robocopy says its receiving invalid parameters in when used in powershell script

I'm attempting to use robocopy in a PowerShell script, but currently failing. When I run the following command manually robocopy \\corporatesystem00.local.com\C$\Maven\ ...
0
votes
0answers
18 views

Set CMTrace Font

Might be a bit of a long shot but I was wondering if anyone knew of, or could speculate on, a way to change the default font of CMTrace. It seems to use some Sans-Serif font. I'd like to change it to ...
-3
votes
2answers
85 views

In which version of windows is powershell installed by default?

As title says. I just installed XP SP2 and i was expecting to have PowerShell 1.0 installed; however, it isn't. It seems I have to manually install it. If I upgrade to SP3 do I get PowerShell. From ...
3
votes
1answer
36 views

How can I probe an SMB share for unencrypted access?

I am enabling SMB encryption with: Set-SmbServerConfiguration -EncryptData $true -Force From a monitoring service, I want to verify that only encrypted connections are accepted. How can I attempt ...
23
votes
2answers
931 views

Is there a way to loop through Windows 8 Apps and remove them all?

Windows apps are annoying and I would like to remove them. Been playing around with Powershell and scripting and I wanted to know if there was a way I could make Powershell to loop through all the ...
6
votes
1answer
263 views

Running PowerShell scripts as an Application in MDT 2013

Is there a way to make powershell scripts run under the applications list so that when you install from the MDT image you can select which scripts you want to run? I can run the scripts fine as ...
0
votes
1answer
81 views

Installing SQL remotely using Invoke-Command

i'm trying to install SQL Server 2012 on Win 2012 r2 server remotely via Powershell using Invoke-Command, but it fails with this error "Validation for setting 'SQLSVCACCOUNT' failed. Error message: ...
1
vote
1answer
105 views

PowerShell Firewall Management

I have a bunch of machines that I need to enable Remote Scheduled Tasks Management (RPC), Remote Scheduled Tasks Management (RPC-EPMAP), and Windows Management Instrumentation (WMI-in) on for GPO ...
0
votes
2answers
123 views

Copy-item FileSystem provider error

Copy-item cmdlet is not working as expected, i don't understand why. This is my code : $Source = "C:\folder1" $Destination = "\\172.22.0.115\c$\folder2\" $Password = ConvertTo-SecureString ...
2
votes
2answers
117 views

How do I install and use the cli53 tools on Windows?

I'm trying to find the simplest way to import a large number of BIND zone files in to Route 53. I've had a quick look at the AWS CLI and AWS Tools for Windows PowerShell but they don't seem to include ...
18
votes
3answers
671 views

How do I delete this orphaned Active Directory computer object (preferably with PowerShell)?

I'm working from a Windows 7 workstation, with PowerShell v2.0, and trying to delete a particular (orphaned?) object from the LostAndFound container in a 2008 R2 FL forest and domain with the Active ...
11
votes
8answers
1k views

Expire Files In A Folder: Delete Files After x Days

I'm looking to make a "Drop Folder" in a windows shared drive that is accessible to everyone. I'd like files to be deleted automagically if they sit in the folder for more than X days. However, it ...
2
votes
1answer
113 views

How to detect if there is any file added in a folder in Windows?

Is it a way to detect if there is any file added in a folder? Include the sub-folder. For example, check if any text file *.txt is added in folder c:\data-files\ or its sub-folders. The folder can ...
2
votes
1answer
156 views

Can I use the GroupPolicy PowerShell module on non-AD standalone servers?

I am trying to use the GroupPolicy PowerShell module to manipulate and read local group policy settings on a standalone Windows 2012R2 server. When I try to execute the Get-GPOReport cmdlet: ...
0
votes
0answers
119 views

backup using powershell in windows 7 , 8

In windows 2008 we can use Add-PSSnapin windows.serverbackup abd use WBbackup command to back file and images. Both windows 7 and windows 8 have backup features; however there is no snapin to use ...
0
votes
0answers
109 views

Using Powershell (RSAT ) to get GPO from against another domain

I can't find any clear info online for what I'm trying to do, hope you can give me an answer :) I'm using a Windows 7 client (pctest) joint in a domain (domain1.intranet). I've installed the RSAT to ...
2
votes
1answer
399 views

server 2012r2: Cannot add-pssnapin windows.serverbackup

I am trying to run powershell script for backups on Server 2012 R2. I Have installed Windows server Backup feature but when try to execute Add-PsSnapin Windows.ServerBackup  I am getting error ...
3
votes
3answers
204 views

Adding remote machine to AD via Powershell

So I have a powershell script, Add-Computer -ComputerName $computername -LocalCredential $computername\admin -DomainName $domain -Credential domain\$username -Force -Restart So if I have a machine ...
0
votes
0answers
233 views

Parameterizing powershell parameters in scheduled tasks

I have a bunch of powershell scripts that are kicked off via scheduled tasks at various times. The script are run multiple times with different arguments. Also admins unfamiliar with scripting needed ...
1
vote
1answer
56 views

Powershell runs all external commands in a new window, omitting output

As described in the subject, my powershell environment is executing all external commands in separate windows. In a typical test run of my team's build script, this includes things like: nuget.exe ...
5
votes
2answers
296 views

How to allow access to winrs for non-admin user?

I have Windows Server 2012 (and Server 2008, but it is next priority) to monitor it using txwinrm. txwinrm library internally is using WinRS protocol. I have to monitor it using least privileged user, ...
6
votes
1answer
231 views

Evaluating current ACEs on NTFS ACLs with PowerShell

We have a document management system that has million of files on a NTFS file system accessed through a network share. A single service account needs full permission to all of these files and the ...
3
votes
2answers
101 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 ...
0
votes
1answer
101 views

What rights should non-admin user have to run Get-WmiObject?

I am trying to monitor windows machine with the help of wmi and powershell remoting. I managed to successfully start remote session with that machine throught non-admin user account, but now I have a ...
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 = ...
6
votes
3answers
869 views

How to find the creation date of a local user account?

I would like to get the creation date of a local user account (Win 7 if it matters). I've looked at the following WMI objects (and google of course): Win32_UserAccount Win32_NetworkLoginProfile The ...
3
votes
2answers
189 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 ...
-2
votes
1answer
785 views

How To List All Computers Operating System On A Network In Powershell

I am looking for a script to show all the machines, hostnames, and OS versions on my domain. I have found a few scripts, but none of the scripts that I have found will do both. Here is an example of ...
0
votes
2answers
136 views

How to collect remote windows logs as a non-admin

I am trying to collect logs from remote windows machines (Windows Server 2008R2 and Windows 7) and I can't figure out a way to do so in such a way that I should still be able to accomplish this ...
4
votes
2answers
157 views

How to force DSC to execute all configurations (Packages) even when a restart/reboot is required

From MSDN RebootNodeIfNeeded: Certain configuration changes on a target node might require it to be restarted for the changes to be applied. With the value “true,” this property will restart the ...
5
votes
1answer
187 views

DSC, how to know if after running the configuration a reboot is required

So I'm using DSC Push mode I have about 200 deployments per day to several environments (DEV/INT/QA/PROD) Every time that I deploy I want to make sure that each server is configured correctly So ...
10
votes
5answers
2k views

Powershell - Retrieve current domain user's full name

Using Powershell, how can I get the currently logged on domain user's full name? Not only its username. Thanks EDIT: without the need of the activedirectory module!
3
votes
2answers
302 views

Can you use WMI to determine if a connection gets its DNS servers from DHCP?

The DNS server search order for a network interface can be read from Win32_NetworkAdapterConfiguration like this in Powershell, or programmatically using .Net ManagementObjects: > $NICs = ...
4
votes
4answers
278 views

Is it possible to disable msiexec help GUI?

I'm automating unattended retrieval & installation of specified .msi packages with a powershell script but if the command is invoked with syntax errors the msiexec will wait indefinitely for an OK ...
2
votes
2answers
2k views

Powershell: Single Script to “clean” multiple folders of files older than

I would like to create a maintenance script that would run on each of our servers to clean out common drop/archive directories. Preferably the script would use a reference file for the folder path ...
3
votes
1answer
1k views

How to install PowerShell 3.0 or 4.0 via WSUS

I can't seem to find any information about Windows Management Framework 4.0 on WSUS. As far as I can tell it's not available for approval or download in WSUS, and it looks like Windows Management ...
3
votes
1answer
122 views

Change shortcut arguments via script

We have a program here that requires every user to have a shortcut on their desktop that points to an ini file. Each file is unique to the user. Recently, we've done a new install of the application ...
4
votes
1answer
321 views

PowerShell DSC Group Resource - “Could not find a principal with the provided name”

I am trying to use PowerShell DSC to add a domain group to the local administrators group. Here is the code: Configuration TestSetup { Node localhost { Group Administrators { ...
0
votes
0answers
81 views

Why AD DS user is able to write to ADLDS(ADAM) container(user is neither imported nor added as foreignsecurityprincipal)?PS/dsacls cmd to fix it-DENY

I have installed 'AD LDS' instance on one of my windows server 2012 which is part of a domain. I brought few users (windows security principals to 'AD LDS') as 'ForeignSecurityPrincipals' from AD DS ...
4
votes
2answers
289 views

How do I identify a volume in WMI from a volume name reported in the event log?

I have a Windows 2008R2 server that's reporting the following error: The file system structure on the disk is corrupt and unusable. Please run the chkdsk utility on the volume ...
1
vote
1answer
103 views

How to speed up applying impersonation rights changes?

I often add impersonation rights on various Windows Servers running Exchange Servers (2010, 2013) using PowerShell (New-ManagementRoleAssignment –Name:impersonationAssignmentName ...
10
votes
4answers
875 views

PowerShell DSC copy from network share

I am trying to use PowerShell DSC to copy folder contents from a network share. Here is the code: Configuration TestSetup { Node localhost { File Test { SourcePath = ...
3
votes
1answer
348 views

How can a set a Security Group's email address using PowerShell?

I need to create many groups with email addresses. I would prefer to use Security Groups to reduce the number of groups we have to maintain, otherwise we'd have an identical Distribution Group for ...
2
votes
3answers
625 views

power shell error: Cannot bind parameter

when i am trying to execute the below PowerShell command, i got error . The command : *PS cert:\currentuser\authroot> gci | where subject -like "UTN"* The error is below : Where-Object : Cannot ...
0
votes
0answers
81 views

scurity tab is missing in ADSI Edit for AD Lightweigh Service instancess. (authorizing users in AD LDS)

I am new to AD LDS. I have installed AD LDS instance in my Windows Server 2008 R2 and 2012 servers as I want to you use AD LDS instance for directory services for my app. I am able to install the ...