Quantcast
Channel: The Official Scripting Guys Forum! forum
Browsing all 15028 articles
Browse latest View live

Change user profile path on login

I have a set of VMs on the domain that a large group of AD users will be able to log into. After each reboot, the VMs return to a previous state, so everything is wiped. I'm trying to speed up login...

View Article


VBS Script to adapt in another language

I have a script that works perfectly fine on english-based computers but does not once in another language. The script gets the Recovery Key for Bitlocker of a Machine and then backs it up into Active...

View Article


Powershell Script Not putting any data in output

I have a powershell script that matchs a text file with file names to a directory consisting of data files On the first match between these 2 it should copy the matched file in the directory to another...

View Article

WMI PhysicalMemory MemoryType returns 0 when using Powershell...

Dear Scripting Guy,I am currently converting a VBScript that I had put together into Powershell.  I found that when I query WMI_PhysicalMemory, MemoryType that I get 0.  I decided to start switching...

View Article

multiple wmi queries - export csv

Hello I am trying to query wmi data and export it to a csv, how ever I cant seem to get multiple wmi data to append to the same file. I don't know why you can't chain the command.$computers =...

View Article


Robocopy and scheduled task 0x3

I have a batch file that runs robocopy weekly.robocopy "D:\Database BU Transit"     "E:\HCNBUWeekly" /e /v /r:1 /w:1 /log:C:\Backup\logs\Weekly.log /np /nfl /ndl robocopy "D:\Database BU Transit"...

View Article

Custom types on function return values

Hello,I have the following functionfunction Get-Space {<# .Synopsis Returns disk space details on computer .Example Get-Space $env:ComputerName Get space for the computer you are currently on...

View Article

Access denied exception is not catched

Within a for-each block, I use the following powershell code to analyze file paths: $path = "\\server\" + $fileName try{ test-path -path $path; $%variable.Length } catch { write-host "catched "...

View Article


start sleep script need understanding

$job = Start-Job {$i=0; $c=0; while (1) { Write-Progress Activity "Step $i"; $i++; Start-Sleep -sec 1 }} while ($job.State -eq 'Running' -And $c -lt 5) { $c++; $progress=$job.ChildJobs[0].progress;...

View Article


Set-Acl not applying permissions on folder

Hello,Can anyone explain why this isn't working? I can't seem to get it working. It creates the folder, adds user, but it dosn't apply the actual permissions on the folder. I don't get any errors....

View Article

Script to tracert multiple computer names and find specifc text

I'm looking for a script to tracert multiple servers and find a specific text in tracert output and get output as csv. Below is what I have: @ECHO OFF FOR /F %%S IN (SERVERS.TXT) DO ( ECHO %%S >>...

View Article

Error while deleting files in InetPub

Hi everyone i am using the following code to delete files from inetpub but i am getting the error that some files cannot be deleted because they are being used by another process i am using the...

View Article

Creating Multiple Mailboxes in Powershell

Just a little background of our email set up. We have a Hybrid system in place (on-premise + Office 365 / Exchange Online).I'm tasked in creating over 70 user mailboxes in one sitting and I was hoping...

View Article


MemberOf should be only the Name an not CN">How can i reduce the Output of "Get-QADUser Username | Format-List LogonName,...

Get-QADUser Username | Format-List LogonName, MemberOf gives me:LogonName      : UserName MemberOf       : {CN=G-Usr-XXX-XXXXX-XXXXXXXX-Write,OU=XXXXXX,OU=XXXXX,OU=XXX,DC=XXXXXX,DC=XX, ..........

View Article

Powershell one-liner to add domain user to a local group

I'm looking for a one liner that can be typed in to add a domain user to a local group.  I know it can be done using net.exe but with the trend to move admin controls to powershell I doubt net.exe will...

View Article


powershell map network drive based on the user group

Dear everyone,I know there is a tone of topics about that but i need a script a bit specific.I need in Powershell to map a network drive based on the group user.The particularity is : There is not a...

View Article

DSC error: Cannot invoke the SendConfigurationApply method. The...

Hello,I ran a DSC configuration script, it seemed to hang, and I received an error that I can't find a resolution for anywhere:"Cannot invoke the SendConfigurationApply method. The...

View Article


remote registry array of computers. to determine value to be exported

hello, so I am trying to create a script now that reads the value from the registry of multiple remote computers and based on that value, executes a conditional statement that chooses what to add to my...

View Article

Question about how the Robocopy /B switch works...

I've been experimenting with robocopy recently, and most switches seem self explanatory for the most part; although I have a question about the /B switch.The help says the following:/B :: copy files in...

View Article

Robocopy always says New Dir for the same directories every run

I'm running robocopy with the following settings    Files : *.*          Options : *.* /S /COPYALL /PURGE /MIR /ZB /NP /R:1000000 /W:30 But comparing logs over the last couple weeks, it always does the...

View Article
Browsing all 15028 articles
Browse latest View live


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