How Can i implement a SCD type 2
Hi,
I have a operational Database with Product table the data of the Product table like as bellow :
product_id product_name product_price product_date 110 DELL 1000 2017-03-01 00:00:00.000 112 HP 900 2017-03-01 00:00:00.000 113 Lenovo 1100 2017-03-01 00:00:00.000 114 MAC 1300 2017-03-01 00:00:00.000
and i have a DWH that contain a dimension Called DimProduct the data of the Dimension like as bellow :
SK product_id product_name product_price product_Insertdate product_Updatedate 1 110 DELL 1000 2017-03-01 00:00:00.000 NULL 2 112 HP 900 2017-03-01 00:00:00.000 NULL 3 113 Lenovo 1100 2017-03-01 00:00:00.000 NULL 4 114 MAC 1300 2017-03-01 00:00:00.000 NULL
Sometimes the data change in the Operational Database and specially the column with contain the price
Suppose the first product had changed the price in the operational Database automatically the Product_date will change see the data as bellow
product_id product_name product_price product_date 110 DELL 900 2017-03-05 00:00:00.000 (the price changed also the date changed) 112 HP 900 2017-03-01 00:00:00.000 113 Lenovo 1100 2017-03-01 00:00:00.000 114 MAC 1300 2017-03-01 00:00:00.000
No i want this data will be historical in my Dimension Product the Dimension Product will be like as bellow
SK product_id product_name product_price product_Insertdate product_Updatedate 1 110 DELL 1000 2017-03-01 00:00:00.000 2017-05-01 00:00:00.000 2 112 HP 900 2017-03-01 00:00:00.000 NULL 3 113 Lenovo 1100 2017-03-01 00:00:00.000 NULL 4 114 MAC 1300 2017-03-01 00:00:00.000 NULL
5 110 DELL 900 2017-05-01 00:00:00.000 NULL
The solution that i have tried with SSIS is using the component of SCD but i don't have the result what i want because in my case the Product_UpdateDate will be the date of new product and when i use the SCD component the Product_UpdateDate will be the Date of the system
How can i fix that ?
They are other method implement the SCD may be using only the SQL query ?
Please help me !!!
- Edited by YassirCool Thursday, March 9, 2017 12:20 AM
Reply:
------------------------------------
i try to install kodi but telling me im not connected to server how do i solve this
Reply:
------------------------------------
Mobile Insiders : You have a new insider build 15051 in Fast ring.
- Edited by david hk129 Thursday, March 9, 2017 12:57 AM
DISM not working properly for a version upgrade
Trying to upgrade a Windows Server 2012 R2 from evaluation to standard. When I run "DISM /online /Get-CurrentEdition" to start the upgrade process, the command returns: "Deployment Image Servicing and Management tool. Version: 6.3.9600.17031". It then returns to the command prompt. I even tried to run the next command in the upgrade process, and it also returned the same results. I rebooted the server, but no joy.
Please help, as I had re-armed the server twice before, and it only has 27 days left in the current evaluation version.
Thanks
Reply:
Also try from an elevated cmd.exe session
(thread type should be question, not discussion)
Regards, Dave Patrick ....
Microsoft Certified Professional
Microsoft MVP [Windows Server] Datacenter Management
Disclaimer: This posting is provided "AS IS" with no warranties or guarantees, and confers no rights.
------------------------------------
How to get a remote process.respongding And run a remote EXE with powershell?
- Changed type Bill_Stewart Friday, April 28, 2017 7:17 PM
- Moved by Bill_Stewart Friday, April 28, 2017 7:17 PM This is not "research information for me" forum
Reply:
-- Bill Stewart [Bill_Stewart]
------------------------------------
Reply:
------------------------------------
2k17
jermarrick
- Moved by Dave PatrickMVP Wednesday, March 8, 2017 6:12 PM
- Changed type Dave PatrickMVP Wednesday, March 8, 2017 6:12 PM
Great news........ if that will actually materialize.
Excerpt ...............
Guess what, folks? We won.In an unmistakeable about-face -- and a victory for common sense -- Windows 10 will no longer automatically take control of your computer, and flip the reset switch, at the worst moments imaginable.
Mind you, Microsoft will still push updates, and it won't necessarily be easy to completely turn them off.
But this spring, you -- and only you -- will get to decide when Windows 10 can update your computer.
Link to read the whole article................
Get rid of multiple modes please
Hi,
I am quite annoyed by the fact that there are two modes in SQL Server Management Studio: Readonly and "edit" mode.
One mode has syntax highlighting, one does not. One mode displays binary values in cells, one does not. In one mode, Ctrl+R refreshes the view, in the other mode it toggles the result area. Both modes have different toolbars - but with similar content. The difference in behaviour is quite annoying and difficult to understand. There should only be one mode and allow both reading and writing and combine all useful functionalities from both modes.
Best regards,
Florian
Reply:
If this feature is important to you, consider submitting product feedback directly: https://connect.microsoft.com/SqlServer
It seems you are referring to the Object Explorer 'Select Top ...' and 'Edit Top ...' rows context menu. Although the functionality may seem similar at a cursory glance, there are some fundamental differences within SSMS you should be aware of before submitting feedback.
'Select Top...' builds the SELECT statement and executes it in a normal query window with results in a read-only grid. This allows you to leverage InteliSense to modify the query as desired and use the normal query window shortcut keys.
The 'Edit Top...' builds and executes a SELECT statement with the results displayed in a specialized editable grid. Data modifications made to the data grid are executed via parameterized queries. The SELECT TOP query is not exposed by default but can be viewed and edited (sans InteliSense) from the Qeury Designer-->Pane-->SQL menu. I think much of your suggestion would be satisfied by making the SQL visible by default, with InteliSense, and enhancements to the editable grid display and editing capabilities.
Dan Guzman, Data Platform MVP, http://www.dbdelta.com
------------------------------------
Powershell Editing Programs with 'Unknown' Max Run Time values (duration = 0)
Saw a few posts with similar need. So posting some logic that I wrote to overcome the challenge. Please note that when using scripts to make changes to a large SCCM environment, you will cause replication traffic. To minimize such this script allows you to have a delay between each edit and to limit the number of objects targeted during each run. This script also write real-time progress to the screen as well as a log file.
#---------------------------------------------------
#- AUTHOR : Don Rowland
#- DATE : 2017 March 8
#- PURPOSE : Identify and update programs where the Max Run Time (Duration) is set to 'Unknown' (0)
#---------------------------------------------------
PARAM(
[Parameter(Mandatory=$True,HelpMessage="Please Enter Site Server Name")]
$SCCMServerName,
[Parameter(Mandatory=$True,HelpMessage="Please Enter New Duration Value")]
$NewDuration,
[Parameter(Mandatory=$True,HelpMessage="Please Enter Seconds to Delay after each edit")]
$DelaySec,
[Parameter(Mandatory=$True,HelpMessage="Please Enter Number of Programs to target")]
$NumberOfPrograms
)
Function LogWrite (
[string] $MyLogfile = (throw "Missing Log File Path"),
[string] $MylogEntry = (throw "Missing Log Entry")
)
{
$TimeStamp = Get-Date
Add-content $MyLogfile -value "$TimeStamp $MylogEntry"
}
$MyUser = [Environment]::UserName
$MyDomain = [Environment]::UserDomainName
$MyComputername = [Environment]::MachineName
$MyScriptFullPath = Split-Path $SCRIPT:MyInvocation.MyCommand.Path -parent
$MyScriptName = Split-Path $SCRIPT:MyInvocation.MyCommand.Path -leaf
Write-Host "Executing: $MyScriptFullPath\$MyScriptName"
$MyLogFileName = "$MyScriptName.log"
$x = "Installlog"
$InstalllDir = (Get-Item env:$x).Value
If ($InstalllDir.length -eq 0)
{
$LogfilePath = "C:\Windows\temp\$MyLogFileName"
Write-Host Logging to PATH $LogfilePath
}
Else
{
$LogfilePath = "$InstalllDir\$MyLogFileName"
Write-Host Logging to ENV $LogfilePath
}
LogWrite -Mylogfile $LogfilePath -MyLogEntry "Executing: $MyScriptFullPath\$MyScriptName"
LogWrite -Mylogfile $LogfilePath -MyLogEntry "Running As: $MyDomain\$MyUser on $MyComputername"
#---------- MAIN Start ------------------
$SiteNameSpace = "root\sms\" + (Get-WmiObject -ComputerName $SCCMServerName -Namespace "root\sms" -class "__NAMESPACE" | Select name).name
Write-Host $SCCMServerName $SiteNameSpace
$ListOfPrograms = Get-WmiObject -ComputerName $SCCMServerName -Namespace $SiteNameSpace -Class SMS_Program -Filter "Duration='0' and ProgramName <> '*'" | SELECT -First $NumberOfPrograms
foreach ($Program in $ListOfPrograms) {
$Program.Duration = $NewDuration
Try {
$Program.put() | out-null
Write-Host [(Get-Date)] $Program.PackageID $Program.ProgramName " - Duration set to : " $NewDuration
LogWrite -Mylogfile $LogfilePath -MyLogEntry "$($Program.PackageID) $($Program.ProgramName) - Duration set to : $NewDuration"
Start-Sleep -Seconds $DelaySec
} Catch {
Write-Host [(Get-Date)] $Program.PackageID $Program.ProgramName " - FAILED : " $_.Exception.Message $_.Exception.ItemName
LogWrite -Mylogfile $LogfilePath -MyLogEntry "$($Program.PackageID) $($Program.ProgramName) - FAILED : $($_.Exception.Message) $($_.Exception.ItemName)"
Start-Sleep -Seconds $DelaySec
}
}
VPN
Hi
I want to configure VPN server that i can access from my home. Help me to configure this.
ADO Disconnected Recordset - Issue with more than 1000 records
Guys, I'm having an issue with a disconnected ADO record set in vbscript. I'm querying AD and retunring the result sinto a RDS using the following code:
Set oConnection = CreateObject("ADODB.Connection")
oConnection.Provider = "ADsDSOObject"
oConnection.Open "Active Directory Provider"
Set oRS = CreateObject("ADOR.Recordset")
Set oRS.ActiveConnection = oConnection
oRS.CursorLocation = adUseClient
oRS.CursorType = adOpenStatic
oRS.LockType = adLockOptimistic
oRS.Source = sLdapQuery
oRS.Open
Set oRS.ActiveConnection = Nothing
Now, when I loop through my result set as follows, it stops after 1000 results with the following error after calling oRS.MoveNext
Do While Not oRS.EOFoRS.Fields("name")
oRS.MoveNext
Loop
Microsoft Cursor Engine: Data provider or other service returned an E_FAIL status.
Any ideas? Can't see a way to increase the page size when using a disconnected rs.
- Changed type Bill_Stewart Friday, April 28, 2017 7:11 PM
- Moved by Bill_Stewart Friday, April 28, 2017 7:11 PM This is not "fix/debug/rewrite my script for me" forum
Reply:
-- Bill Stewart [Bill_Stewart]
------------------------------------
Reply:
Add "Page Size" set to 500.
oConnection.Properties("Page Size") = 500
\_(ツ)_/
------------------------------------
Reply:
------------------------------------
Reply:
-- Bill Stewart [Bill_Stewart]
------------------------------------
Reply:
Bill, I'm not sure what use your reply is to me? I use powershell extensively but have a requirement to use VBScript i this case. Specifically I'm using ADO so not sure what relevance powerhsell has?
ADO works better in PowerShell.
I posted an example of how to add paging. It must be set to other than default or only 1000 records will be returned.
\_(ツ)_/
------------------------------------
Reply:
Doesn't seem like 'Page Size' is a a valid value in the properties collection of the connection object
- ADODB.Properties: Item cannot be found in the collection corresponding to the requested name or ordinal
:(
------------------------------------
Reply:
The following script will retrieve every item in the domain. In a small test domain I just retrieved 7745 records.
I had forgotten that the "Page Size" goes on the recordset and not on the connection. I ran this from PowerShell to capture the results for an easy count. It can retrieve 10,000+ records in about 2 seconds.
PS > $x = .\ldaptest.vbs
PS > $x.Count
Set objcon = CreateObject("ADODB.Connection") Set objrs = CreateObject("ADODB.Recordset") Set objcom = CreateObject("ADODB.command") Set objrootdse = GetObject("LDAP://RootDse") strDN = "GC://" & objrootdse.Get("rootDomainNamingContext") objcon.Provider = "ADsDSOObject" objcon.Open "ADS Provider" Set objcom.ActiveConnection = objcon objcom.Properties("Page Size") = 500 objcom.CommandText = "<" & strDN & ">;" & strFilter & ";adspath;subtree" Set objrs = objcom.Execute While Not objrs.EOF WScript.Echo objrs("adspath").Value
objrs.MoveNext Wend 7745 records are returned in 990.0164 ms Allowing for startup time that is about exactly 10,000 records per second.
\_(ツ)_/
- Edited by jrv Wednesday, March 8, 2017 9:41 AM
------------------------------------
Reply:
------------------------------------
Reply:
By default the AD provider only produces a disconnected record set. It is saved in "objrs".
You can close the connection and the data will remain.
It is far easier and more flexible to do this in PowerShell.
\_(ツ)_/
------------------------------------
Is the Service Manager Monitor Useful?
It's been several months since I published the Service Manager Monitor.
I see that, as of this forum post, it's been downloaded 75 times. Do you still use it? Has anyone who uses it found it useful? If so, please share how it has helped.
Thank you, Foothill
- Changed type Xin GuoMicrosoft contingent staff Monday, December 7, 2015 3:03 AM
Reply:
The description looks promising, but it doesn't launch for me. Getting an Application Startup Failure - System.Net.Sockets.SocketException: No such host is known...
If I find a way to work around this error, I'll post an update.
------------------------------------
set datepicker date value to the last available Saturday
I have a requirement where I have to select only 'Saturday' from the datepicker, which I have done. The other requirement is that the default datepicker value should be set to last available Saturday of the present month or ealier one. So for e.g. if I click on the datepicker today i.e. 7th March, the datepicker should be set or shown as 4th March (which was the last available Saturday). This fix can be in jquery or c# code, anything is preferable, though its better I can try out both to see what works.
Thanks In Advance.
Reply:
------------------------------------
Reply:
Hi All,
I have found one code logic, just posting it here for others who wish to use this logic in your code.
Following is the code logic.
$("#teamAddInputDate").datepicker('setDate', get_first_saturday(new Date)); function get_first_saturday(d) { var day = d.getDay(); var numberOfDaysToAdd = -(day + 1); firstsaturday = d.getDate() + numberOfDaysToAdd; return new Date(d.setDate(firstsaturday)); } Thanks.
------------------------------------
CONTAINSROW() instead of CONTAINS() -- Virtual Relationship DAX Pattern
Hello,
Any ideas how to re-write the 2nd FILTER () argument for the DAX below using CONTAINSROW() instead of CONTAINS() ?
Thank you
CALCULATE( [SalesAmount], FILTER( ALL(Sales[ProductKey]), CONTAINS( VALUES('Product'[ProductKey]), 'Product'[ProductKey], Sales[ProductKey] ) ) )
How to add CSV as two different sheet in existing excel workbook
Hello
I am generating an CSV. Now I want to add this csv in two different sheet in excel book where first sheet add cscv as it is and another I want to add CSV with formatting with limited columns lets say EmployeeCode, EmployeeName and EmployeeCity . How can I do this?
Please advise any sample code or any article
Avian
- Edited by Avian123 Tuesday, March 7, 2017 8:03 AM
Reply:
I am able to import CSV in existing workbook without formatting using following code. I also want to set sheet as 3rd sheet. Currently it is inserting as 2nd sheet.
$s1 = $workbook.sheets.add() $ak="Avian" $s1.Name = $ak $s1.Activate() $s1Data = Import-Csv $file $s1data | ConvertTo-Csv -Delimiter "`|" -NoTypeInformation | Clip $s1.cells.item(1,1).Select() $s1.Paste() $workbook.SaveAs($FileName) $excel.Quit()
------------------------------------
Reply:
Hallo,
there are a lot of ways to do this. The first and most simple one would be to simply open the csv with excel the same way like opening a excel workbook. Then, you can copy it into your existing workbook.
To get only some columns, you should create another csv, where you reduced properties with Select-Object before.
Best wishes
Christoph
------------------------------------
Reply:
Look in the Gallery for dozens of examples of how to load a format a CSV.
The steps are
- Create Excel object
- Add workbook
- Add template (for formatting)
- Add CSV to workbook as sheet
- save in XLSX document
\_(ツ)_/
------------------------------------
Reply:
Thanks JRV, got it.
Now I am struggling in changing in worksheet background color rgb(180,198,231). How can I change backgroundcolor of the sheet ($s1 as I created in my initial code)?
------------------------------------
Reply:
------------------------------------
Reply:
Here what I did, it seems to be working
$sheet2.Cells.Interior.ColorIndex = 24
------------------------------------
Reply:
Here is how to set the background color for a range:
Add-Type -AssemblyName System.Drawing $xl = New-Object -ComObject Excel.Application $xl.Visible = $true $wb = $xl.Workbooks.Add($filename) $wb.Worksheets[1].UsedRange.Interior.Color=[system.drawing.Color]::Red
\_(ツ)_/
------------------------------------
Reply:
Here is an example of how to use Excel to load CSV files and to create tables with formatting.
function FormatAsTable{ Param( [microsoft.office.interop.excel.range]$SourceRange, [string]$TableName, [string]$TableStyleName ) $SourceRange.Worksheet.ListObjects.Add( [microsoft.office.interop.Excel.xlListObjectSourceType]::xlSrcRange, $SourceRange, [type]::Missing,
[microsoft.office.interop.Excel.xlYesNoGuess]::xlYes, [type]::Missing ).Name = $TableName $SourceRange.Worksheet.ListObjects[$TableName].TableStyle = $TableStyleName $SourceRange.Columns.AutoFit() } $filename = "$pwd\test.csv" $wsname = ([io.fileinfo]$filename).Basename $xlfile = [io.fileinfo]$filename -replace '\.csv', '.xlsx' $xl = New-Object -ComObject Excel.Application $xl.Visible = $true $xl.DisplayAlerts = $false $wb = $xl.Workbooks.Add($filename) FormatAsTable $wb.Worksheets[$wsname].UsedRange $wsname TableStyleDark2 $wb.SaveAs($xlfile, [Microsoft.Office.Interop.Excel.XlFileFormat]::xlWorkbookDefault) $wb.Close() $xl.Quit() while ([System.Runtime.Interopservices.Marshal]::ReleaseComObject($wb)) { } while ([System.Runtime.Interopservices.Marshal]::ReleaseComObject($xl)) { } Start-Process $xlfile \_(ツ)_/
- Edited by jrv Tuesday, March 7, 2017 7:02 PM
------------------------------------
Reply:
------------------------------------
Reply:
I actually prefer using a template as it gives us external control over the format. A template can be as complex of a report as you need with headers and footers and paging. It can also be used to generate a PDF in one line.
\_(ツ)_/
------------------------------------
MDS Error - A database error has occurred. Contact your system administrator.
Hi Guys,
When I try to open certain MDS entity, the error below appears and I have no idea what can be, all the data appears correctly in excel but the domain based attributes can not be selected. In online version of MDS the entity works as expected, please help me solve this issue.
A database error has occurred. Contact your system administrator.
------------------------------
Program Location:
at Microsoft.MasterDataServices.AsyncEssentials.AsyncResultBase.EndInvoke()
at Microsoft.MasterDataServices.ExcelAddInCore.AsyncProviderBase`1.EndOperation(IAsyncResult ar)
at Microsoft.MasterDataServices.ExcelAddInCore.DataPresenter.EndRefresh(IAsyncResult asyncResult)
at Microsoft.MasterDataServices.ExcelAddInCore.DataView.<>c__DisplayClass1f.<RefreshData>b__1d(IAsyncResult ar)
at System.Threading.Tasks.TaskFactory`1.FromAsyncCoreLogic(IAsyncResult iar, Func`2 endFunction, Action`1 endAction, Task`1 promise, Boolean requiresSynchronization)
Thanks for the Help
Reply:
Hi Bruno,
please provide more clear repro-steps and detailed information about the issue, cant think of any inputs just looking at the error information .
- sunny
------------------------------------
Windows Defender Security Center
Windows 10 Pro Insider Preview 15048
I received an "exclamation" mark on the WD icon at system tray.
I "opened " it and it said my power options is set at Never sleep, and that impacts my battery life.
That's fine and dandy.
BUT, I should have an option such as "Ignore" if I want to, and that exclamation mark will not re-appear because of the same setting.
As of now I will have to change my power options or I will forever getting an exclamation mark at system tray.
That kind of bothers me as I prefer things in proper order, and I definitely do not want to open the center to find out it is just the same warning.
- Edited by david hk129 Tuesday, March 7, 2017 12:04 AM
Reply:
Also report that in the Feedback Hub.
Rob Brown - Microsoft MVP - Windows and Devices for IT - Windows Insider MVP : Bicycle - Mark Twain said it right.
------------------------------------
Reply:
Upon restart, the exclamation mark is gone.
That does not make sense at all.
------------------------------------
Reply:
Rob Brown - Microsoft MVP - Windows and Devices for IT - Windows Insider MVP : Bicycle - Mark Twain said it right.
------------------------------------
Reply:
Well, after 9+ hours, the exclamation mark reappears.Upon restart, the exclamation mark is gone.
That does not make sense at all.
Same warning about battery life/health.
------------------------------------
Reply:
Upon restart, the exclamation mark is gone.
That does not make sense at all.
Well, after 9+ hours, the exclamation mark reappears.
Same warning about battery life/health.
Thought I could remove it from system tray by going to task manager and clicked End Task.
I was wrong. it's still in the system tray.
The crazy part is..... I don't remember how I put it to the system tray.
Oh well. Not a big deal.
------------------------------------
Can anyone fix Powershell Guy's Metadata script?
This one here: https://gallery.technet.microsoft.com/scriptcenter/get-file-meta-data-function-f9e8d804#content
When I run: Get-FileMetaData -folder (gci e:\music -Recurse -Directory).FullName
As per the comments in the file, it searches the subfolders, but not the parent folder. I need it to do both.
Thanks.
- Changed type Bill_Stewart Friday, April 28, 2017 6:21 PM
- Moved by Bill_Stewart Friday, April 28, 2017 6:21 PM This is not support forum for gallery scripts
Reply:
You can ask the script author on the Q&A tab for that script:
-- Bill Stewart [Bill_Stewart]
------------------------------------
Reply:
------------------------------------
Reply:
There's nothing to fix in the script, because your question is about how to get a list of subdirectories using Get-ChildItem that includes the root directory. That command doesn't do that, as you have noticed. However, since the script accepts multiple directory names as input, you can simply do this:
Get-FileMetaData -Folder "E:\music",(Get-ChildItem "E:\music" -Recurse -Directory).FullName
Run the command by itself to see how it works:
"E:\music",(Get-ChildItem "E:\music" -Recurse -Directory).FullName
-- Bill Stewart [Bill_Stewart]
------------------------------------
Reply:
Thanks Bill. Just tried running it with:
Get-FileMetaData -folder "C:\users\Jason\Desktop", (Get-ChildItem "C:\users\Jason\Desktop\" -Recurse -Directory).FullName | select name,'file extension',folder,subject,title | Out-GridView
..but it fails after the last file of the root folder with the following:
You cannot call a method on a null-valued expression.At C:\Users\Jason\Desktop\Get-FileMetaData.ps1:65 char:22
+ foreach ($File in $objFolder.items())
+ ~~~~~~~~~~~~~~~~~~
+ CategoryInfo : InvalidOperation: (:) [], RuntimeException
+ FullyQualifiedErrorId : InvokeMethodOnNull
Any ideas?
------------------------------------
Reply:
This one works better.
function Get-FileMetaData{ Param( [Parameter()] [string]$path=$PWD, [string]$filter='*.*', [switch]$NoTrim ) Write-Verbose $path $shell = New-Object -ComObject Shell.Application $folder=$shell.namespace($path) # get all tagnames for this folder $TagNames=0..65 |%{$folder.getDetailsOf($folder.items, $_)} # get all file metadata if($files=Get-ChildItem -Path $path -Filter $filter -File){ foreach ($file in $files){ #$fi=Get-Item $file.FullName $file | Add-Member -MemberType NoteProperty -Name MetaData -Value @{} for ($i=0; $i -lt 65; $i++ ){ if($item=$folder.ParseName($file.Name)){ $value=$folder.GetDetailsOf($item,$i) if($value){$file.MetaData.Add($TagNames[$i],$value)} } } $file } }else{ Write-Host 'No files found' -fore green } } Get-FileMetaData | Select-Object -ExpandProperty MetaData -first 2 $files = Get-FileMetaData -filter *.jpg $files[0].Metadata \_(ツ)_/
- Edited by jrv Tuesday, March 7, 2017 9:29 PM
------------------------------------
Reply:
You need to understand that many of the scripts in the Gallery are examples that you are expected to modify to your own needs. My script was started in VBScript many, many years ago and is still just a template that I can tweak to do special things.
Unfortunately the metadata is mostly supplied by the "shell" and does not lend itself to a Net class or MS would have created an extension for the io.fileinfo type to retrieve the metadata. Metadata is specific to the vendor that supplies the installed software that registers the extension. The tag index is defined by the industry and many tags are large numbers in the 1000s especially for video files, camera files and special document type like AutoCad and other proprietary graphics formats. The metadata is obtained by calling a dll registered by the vendor. Some like JPEG are installed in Windows by Microsoft and may not reference all tags.
You can get metadata from image and video files using the Net Framework. You cannot get most MetaData from PDFs and Office documents without having the programs installed.
\_(ツ)_/
------------------------------------
Reply:
-- Bill Stewart [Bill_Stewart]
------------------------------------
Reply:
------------------------------------
Reply:
-- Bill Stewart [Bill_Stewart]
------------------------------------
Reply:
------------------------------------
Reply:
-- Bill Stewart [Bill_Stewart]
------------------------------------
PowerShell Script in a Orchestrator Runbook
Hey everyone,
So, a while ago I created a Runbook to create AD users leveraging a SharePoint list. We have started using extension Attributes to filter Dynamic Distribution Groups, so I have to change my Runbook. After some reading, I wrote the below snippet, which if I run it outside of Orchestrator works like a charm, and inside Orchestrator says it works, but nothing is changed.
$Result = invoke-command -computername DomainController-scriptblock {set-aduser {Sam Account Name from Initialize Data} -add @{extensionAttribute1 = "{Type from Initialize Data}"; extensionAttribute2 ="{Location from Initialize Data}"}}
$Result | out-string
The $Result variable is published from the script. As always any help/ideas are most appreciated.
- Changed type Bill_Stewart Friday, April 28, 2017 6:16 PM
- Moved by Bill_Stewart Friday, April 28, 2017 6:17 PM This is not an orchstrator support forum
Reply:
You don't need Invoke-Command, Out-String, or a result variable. Just type the Set-ADUser command.
The user account that runs the Set-ADUser command must have sufficient permission to change the specified AD attributes.
-- Bill Stewart [Bill_Stewart]
------------------------------------
Reply:
------------------------------------
Reply:
------------------------------------
Reply:
------------------------------------
Reply:
What system are you running a runbook against? It is the target system that has to support AD CmdLets.
\_(ツ)_/
------------------------------------
Reply:
Here is a discussion of some of the requirements for using AD with a runbook:
System Center 2012 R2 Integration Pack for Active Directory
The Integration Pack for Active Directory is an add-on for System Center 2012 Orchestrator that enables you to connect Orchestrator to your Active Directory Server to automate its management.
\_(ツ)_/
- Edited by jrv Tuesday, March 7, 2017 9:01 PM
------------------------------------
Reply:
This thread would be handled better if it were moved here: https://social.technet.microsoft.com/Forums/en-US/home?category=systemcenterorchestrator
This is a specific "Orchestrator" forum that should be better equipped to go through accessing AD from System Center.
\_(ツ)_/
------------------------------------
Reply:
Perhaps the following articles will be of use to you:
------------------------------------
Differences Server 2016 Iso 22843 vs 30350
Hi,
in october i downloaded the Server 2016 ISO (name: SW_DVD9_Win_Svr_STD_Core_and_DataCtr_Core_2016_64Bit_English_-2_MLF_X21-22843.ISO)
The problem with this iso: If you use WSUS, you need to install the patch kb3194798, which bugfixes the WSUS download.
Today i saw, that there is a newer iso for download: SW_DVD9_Win_Svr_STD_Core_and_DataCtr_Core_2016_64Bit_English_-3_MLF_X21-30350.ISO
So how can i find out, what changes made in the 30350 iso? Is there a changelog site? Googled a little bit around, found nothing.
Thanks in advance
Sebastian
- Changed type Sebastian Mornhinweg Tuesday, March 7, 2017 6:59 PM answered
Reply:
. : | : . : | : . tim
------------------------------------
Reply:
------------------------------------
Reply:
"It would be nice if Microsoft at least published a summary of the changes."
Microsoft has moved to cumulative updates instead of a mass of individual updates. Look at the latest cumulative update to see what is included. Basically they are saving you the effort to apply all the patches yourself by providing a version with the latest cumulative update.
. : | : . : | : . tim
------------------------------------
Reply:
Ok, my question is answered. I set up a VM with this new iso and the server connected and downloaded patches from wsus.
Though there is somewhere a changelog file (such as readme or something) on the iso.
------------------------------------
Reply:
. : | : . : | : . tim
------------------------------------
No comments:
Post a Comment