thread1619-1715904
You can use
$myEmailExt="@efaxsend.com"
$myFiles=Split-Path "C:\staging\*.pdf" -Leaf -Resolve
foreach ($myFile in $myFiles) {
$myFile=$myFile.Remove(10)
$myEmailAddr="$myFile$myEmailExt"
$myEmailAddr
}
Hello all,
I have a quick question. I have a PowerShell script that runs daily at 4AM. Although the job shows completed, it doesn't really run.
The script runs with the following command: powershell.exe -file "path_to_script.ps1"
Any help or suggestions would be greatly appreciated. Thanks.
No idea. I've never seen that error before. I did google it and came up with this link
http://www.computerperformance.co.uk/Logon/code/code_8000500D.htm
I'm not sure I understand exactly what you're asking for but you can try this:
Dim Folder
Dim File
'MainPath = "\\cpo\shares\common\daily reports"
MainPath = "C:\_Temp_Delete\Daily Reports"
Set FSO = CreateObject("Scripting.FileSystemObject")
Set Folder = FSO.GetFolder(MainPath)
For Each...
This should at least get you started:
Const ADS_SCOPE_SUBTREE = 2
Set objConnection = CreateObject("ADODB.Connection")
Set objCommand = CreateObject("ADODB.Command")
objConnection.Provider = "ADsDSOObject"
objConnection.Open "Active Directory Provider"
Set objCommand.ActiveConnection =...
I am having issues with some XP machines not running a logon script via a GPO. When I run gpresult I get the following error:
An error has occurred while collecting data for Scripts.
The following errors were encountered:
An unknown error occurred while data was gathered for this extension...
I had issues with %CLIENTNAME% not being set at login. It seems my login script was running before %CLIENTNAME% was set. So I changed the GPO from running the login script to “Run these Programs at user logon” located in the Computer Container at <Administrative Templates>-<System>-<Logon>. For...
You can use a function like the snippet below:
Function sendMail (mailSubject,mailBody)
Set objEmail = CreateObject("CDO.Message")
Set objFSO = CreateObject("Scripting.FileSystemObject")
Set objShell = WScript.CreateObject ("WScript.Shell")
computerName =...
I agree with markdmac and tsuji, but if you do want to output directly to excel, here's a snippet that might help you:
set xapp = WScript.CreateObject("Excel.Application")
xapp.Visible = True
set workbook = xapp.Workbooks.Add
set worksheet = workbook.Worksheets("sheet1")
i = 0
Do Until...
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.