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 ArticleConvertTo-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 ArticleInstall 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 ArticleFind 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 ArticleHow 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 ArticlePowershell - 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 ArticleHow 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 ArticlePerforming 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 Articlehow 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 ArticleCompiled 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 ArticleSFTP in Powershell
Hi,Can anyone please give me any guideline on implementing "Secure FTP" (SFTP) in powershell for FTP file transfers?
View ArticleNot 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 Articleusing 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 ArticlePower 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 ArticleManage 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 ArticleAssign 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 ArticleExtract 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 ArticleNeed 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 ArticleMapping, 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 ArticleCreate 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