Quantcast
Channel: Windows PowerShell forum
Browsing all 21975 articles
Browse latest View live

Powershell Script Help

add-pssnapin quest.activeroles.admanagement $date = (get-date).ToString() $DistinguishedName = get-content C:\TEMP\90InactiveMoves\SSCtest.txt | foreach-object {get-qaduser $_ -Service 'My server.com'...

View Article


ConvertTo-SecureString strange behaviour

Hi all So I ran into a problem that I hope the community has some input on. We are running powershell workflows under different accounts and are storing these passwords encrypted in a database. When it...

View Article


Install software remotely via Powershell

I'm trying to remotely install an application (Office 2010 Pro to be exact) and it works when I run it locally, but fails when i try it remotely. I have this syntax which I see commonly online as the...

View Article

Find out when it patched

I want to quickly identify the last time a server was patched/rebooted.  I'm using this PowerShell command but i want it to only find the last entry in the eventlog.  Not comb through the entire System...

View Article

How can I use PowerShell 3.0 cmdlets or script to list all the local groups...

Using PowerShell 3.0 (And if possible the CIM, not WMI cmdlet), how can I script with | out-file C:\<filename>.txt or .csv option to list all local user accounts & local groups on remote...

View Article


Powershell - Replacing text and inserting a new line in a file with "\"...

Greetings all,I'm trying to automate updating a configuration file at remote sites.  I need to replace a string in a line, then insert a new line below it with another string.So from this:...

View Article

How to select every nth file from a folder.

Hello all,I am a super power shell newbie, and if there is another way to do something similar to this that anyone knows please feel free to suggest. We are working on a scientific project, and are...

View Article

Performing an SQL-like JOIN operation

Good day,I’d like to perform the equivalent of an SQL-like JOIN operation (i.e. not a UNION) in order to add the following fields:Win32_Process.CommandLineWin32_Process.Description…to the following...

View Article


how do I debug scriptblocks or background jobs

Hi All,I am trying to update an existing powershell script that makes extensive use of scriptblocks and Jobs. How do i set a breakpoint inside these areas and actually hit them? Currently they appear...

View Article


Compiled PowerShell vs standard EXE

I have a pretty extensive VBScript based tool, running about 3500 lines, that manages installing and uninstalling software, and a variety of other settings and tasks related to rolling out Autodesk...

View Article

SFTP in Powershell

Hi,Can anyone please give me any guideline on implementing "Secure FTP" (SFTP) in powershell for FTP file transfers?

View Article

Not able to change the idle session limit of Remote desktop services

Hi,When i go to this path in powershell, trying to change the idle , active and disconnected session limit to 4,5,4 . It doesn't change instead of  changing it shows be "Never" used. Should i set the...

View Article

using invoke-command to install certifications unuseable

Hi,EverybodyI want to install some certificates in a domain from a domain controller for RDS. The installation is successful, but when deploying remoteApp programs, the RDS complains the certificate is...

View Article


Power Shell to Remove Email Address

I've got a txt file that has 180 email address that need to be removed from user accounts within our AD and I'd prefer to do it via a Power shell script versus manually, mostly because I know there...

View Article

Manage Local Group Policy remotely with powershell

All...I'm looking for some way to make a single change to a local group policy on about 100 servers, using powershell.Example, my Standard Group Policy was recently changed:"Specify intranet Microsoft...

View Article


Assign NTFS rights on Remote server

am stuck on getting a script to users with low rights to assign NTFS rights with high priv. The script should have high priv service account's username and pass in the script. The scripts will be...

View Article

Extract AD to CSV file to export users information

Dear all,I will need your kindly help to produce and powershell AD extract where I could filert on the the following info:All users account with the following criteria:users not disabledusers not...

View Article


Image may be NSFW.
Clik here to view.

Need to access files on a NAS (with credentials); New-PSDrive, Net Use?

I simply tried to access a Nas with "Join-Path" but sadly you can not use credentials for that. Now Powershell tells me about "New-PSDrive" to use and in the internet I find plenty of pages about "Net...

View Article

Image may be NSFW.
Clik here to view.

Mapping, strange issue with the Windows Server

This thread comes from here. I just tried to split it up because the actual question there has already been answered.Whatever, forget New-PSDrive cmdlet. I tried it out with mapping. Here's my new...

View Article

Create a Progress Bar using Write-Progress for bulk New-mailboxImportRequests

I am doing some bulk PST imports using New-MailboxImportRequest.  Just FYI, this is the command I used:Dir "\\PATHNAME\*.pst" | %{ New-MailboxImportRequest -Name RecoveredPST -BatchName JPDETW -Mailbox...

View Article
Browsing all 21975 articles
Browse latest View live


<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>